Last active
December 19, 2023 16:40
-
-
Save EpocSquadron/457e33e22039384790ca6c044b96ac1d to your computer and use it in GitHub Desktop.
FAQ Search
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FAQ Search | |
type -> Searching | |
clear -> Showing All | |
List | |
Showing All | |
No Error | |
Showing Error | |
Showing No Results | |
clear -> Showing All | |
Showing Filtered | |
Searching | |
found -> Showing Filtered | |
notFound -> Showing No Results | |
errored -> Showing Error | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Attach Figma frames (artboards) to states | |
// IDs can be found under "Share > Public Embed" in Figma | |
// ** Edit this: Figma File ID | |
const figmaFile = "im9MNjTEksl7YEd92el7iN/branch/7ZXvlIiM8a2kGg5Znm8iSH"; | |
// ** Edit this: List state names and matching Figma frame/artboard IDs | |
const figmaNodes = | |
{ | |
'No Error': '1302%3A5390', | |
'Showing Error': '1327%3A5494', | |
'Showing No Results': '1302%3A5806', | |
'Showing Filtered': '1302%3A6033', | |
}; | |
const figmaURL = "https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/file/" + figmaFile + "/Sample-File?node-id="; | |
function render(model){ | |
const currentStateName = model.active_states[0].name; | |
for (f in figmaNodes) | |
if (currentStateName === f) | |
return $("iframe",{src: figmaURL + figmaNodes[f], width: '100%', height: '100%'}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment