@mozaic-ds/vue
Version:
Mozaic-Vue is the Vue.js implementation of ADEO Design system
55 lines (52 loc) • 1.58 kB
text/typescript
/**
* Code Connect mapping for MIconButton
* Links Figma Icon Button (ADS2) to @mozaic-ds/vue
* Props from figma_get_component (Figma Console MCP) + MIconButton.stories.ts
*/
import figma, { html } from '@figma/code-connect/html';
figma.connect(
'https://www.figma.com/design/Zyh9RyabNaqkjbuFWP9Aqj/%E2%9C%A8-Components--ADS2---Stable-version-?node-id=1-1978',
{
props: {
appearance: figma.enum('Appearance', {
Standard: 'standard',
Accent: 'accent',
Danger: 'danger',
'Inverse (only on dark background)': 'inverse',
}),
size: figma.enum('Size', {
S: 's',
'M (default)': 'm',
L: 'l',
}),
disabled: figma.enum('is disabled', {
False: false,
True: true,
}),
isLoading: figma.enum('Is loading', {
False: false,
True: true,
}),
outlined: figma.enum('Type', { Outlined: true }),
ghost: figma.enum('Type', { Ghost: true }),
},
example: ({ appearance, size, disabled, isLoading, outlined, ghost }) =>
html`<script setup>
import { MIconButton } from '@mozaic-ds/vue';
import { ChevronRight24 } from '@mozaic-ds/icons-vue';
</script>
<MIconButton
appearance=${appearance}
size=${size}
disabled=${disabled}
:is-loading=${isLoading}
outlined=${outlined}
ghost=${ghost}
aria-label="Action"
>
<template #icon>
<ChevronRight24 />
</template>
</MIconButton>`,
},
);