Last active
July 15, 2020 03:36
-
-
Save drunewin/4e4997d5bd3d62903ac6aac9076081e0 to your computer and use it in GitHub Desktop.
Activity Tab
This file contains 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
Activity Tab | |
Default view* | |
tap card -> Card details modal | |
Card details modal | |
tap close btn -> Default view |
This file contains 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 = "SKGZXTY40fT7sQJs4h6jWx"; | |
// ** Edit this: List state names and matching Figma frame/artboard IDs | |
const figmaNodes = | |
{"Default view": "1%3A2", | |
"Card details modal": "1%3A338" }; | |
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