Source code
Revision control
Copy as Markdown
Other Tools
import figma, { html } from "@figma/code-connect/html";
// Desktop v3
figma.connect(
{
props: {
showIcon: figma.boolean("Show icon", {
false: undefined,
}),
label: figma.string("Label"),
},
example: props => html`
<moz-badge
label=${props.label}
iconsrc=${props.showIcon}
title="This appears as a tooltip on hover"
></moz-badge>
<!--
The Figma component allows for a type ("Default" and "New") to be
set, as well as a disabled state. These properties are not
currently reflected in the web component.
-->
`,
}
);