|
| 1 | +import figma from '@figma/code-connect'; |
| 2 | +import { InputField } from '../components/input-field'; |
| 3 | + |
| 4 | +figma.connect(InputField, '<FIGMA_LINK>?node-id=1-297', { |
| 5 | + imports: ["import { InputField } from '@raystack/apsara'"], |
| 6 | + props: { |
| 7 | + prefix: figma.enum('Variant', { |
| 8 | + Prefix: figma.textContent('Prefix') |
| 9 | + }), |
| 10 | + suffix: figma.enum('Variant', { |
| 11 | + Suffix: figma.textContent('Suffix') |
| 12 | + }), |
| 13 | + disabled: figma.enum('State', { |
| 14 | + Disabled: true |
| 15 | + }), |
| 16 | + placeholder: figma.enum('State', { |
| 17 | + Default: figma.textContent('Place holder'), |
| 18 | + Active: figma.textContent('Place holder'), |
| 19 | + Hover: figma.textContent('Place holder'), |
| 20 | + Disabled: figma.textContent('Place holder') |
| 21 | + }), |
| 22 | + value: figma.enum('State', { |
| 23 | + Filled: figma.enum('Variant', { |
| 24 | + Normal: figma.textContent('Filled'), |
| 25 | + Prefix: figma.textContent('Input text'), |
| 26 | + Suffix: figma.textContent('Input text') |
| 27 | + }) |
| 28 | + }), |
| 29 | + size: figma.enum('Size', { |
| 30 | + Small: 'small', |
| 31 | + Large: 'large' |
| 32 | + }), |
| 33 | + label: figma.boolean('Label', { |
| 34 | + true: figma.textContent('Label'), |
| 35 | + false: undefined |
| 36 | + }), |
| 37 | + helperText: figma.boolean('Helper text', { |
| 38 | + true: figma.textContent('Helper Text'), |
| 39 | + false: undefined |
| 40 | + }), |
| 41 | + optional: figma.boolean('Optional'), |
| 42 | + leadingIcon: figma.instance('Leading Icon') |
| 43 | + }, |
| 44 | + example: props => <InputField {...props} /> |
| 45 | +}); |
0 commit comments