Source code
Revision control
Copy as Markdown
Other Tools
import figma, { html } from "@figma/code-connect/html"
/**
* -- This file was auto-generated by `figma connect create` --
* `props` includes a mapping from Figma properties and variants to
* suggested values. You should update this to match the props of your
* code component, and update the `example` function to return the
* code example you'd like to see in Figma
*/
figma.connect(
"https://www.figma.com/design/3WoKOSGtaSjhUHKldHCXbc/Desktop-v3?node-id=1-255&t=1NHTu3TvoKQWOCdP-1",
{
props: {
iconSrc: figma.boolean("Show icon", {
false: undefined,
}),
label: figma.string("Label"),
type: figma.enum("Type", {
Primary: "primary",
Destructive: "destructive",
}),
isDisabled: figma.enum("State", {
Disabled: true,
}),
size: figma.enum("Size", {
Small: "small",
}),
},
example: (props) => html`\
<moz-button
type=${props.type}
disabled=${props.isDisabled}
label=${props.label}
size=${props.size}
iconsrc=${props.iconSrc}
></moz-button>
`,
},
)