Source code
Revision control
Copy as Markdown
Other Tools
// url=https://www.figma.com/design/3WoKOSGtaSjhUHKldHCXbc/Desktop-Components-3?node-id=478-7427&m=dev
// Desktop Components 3
import figma from "figma";
const label = figma.selectedInstance.getString("Label");
const iconSrc = figma.selectedInstance.getBoolean("Show icon", {
});
const description = figma.selectedInstance.getBoolean("Show description", {
true: figma.selectedInstance.getString("Description"),
});
const disabled = figma.selectedInstance.getEnum("State", {
Disabled: true,
});
export default {
id: "moz-box-button-desktop-v3",
example: figma.code`<moz-box-button
${label ? `label="${label}"` : ""}
${description ? `description="${description}"` : ""}
${iconSrc ? `iconsrc="${iconSrc}"` : ""}
${disabled ? "disabled" : ""}
></moz-box-button>`,
};