|
| 1 | +import { CATEGORY_CONTROL } from '@/constants'; |
| 2 | +import { IThemeObjectVariants } from '@/designSystem/themesObject'; |
| 3 | +import { ArgTypesReturn } from '@/types'; |
| 4 | + |
| 5 | +export const argtypes = ( |
| 6 | + variantsObject: IThemeObjectVariants, |
| 7 | + themeSelected: string |
| 8 | +): ArgTypesReturn => { |
| 9 | + return { |
| 10 | + variant: { |
| 11 | + description: 'Select tag variant type', |
| 12 | + type: { name: 'string', required: true }, |
| 13 | + control: { type: 'select' }, |
| 14 | + options: Object.keys(variantsObject[themeSelected].TagVariantTypeV2 || {}), |
| 15 | + table: { |
| 16 | + type: { |
| 17 | + summary: 'string', |
| 18 | + }, |
| 19 | + category: CATEGORY_CONTROL.MODIFIERS, |
| 20 | + }, |
| 21 | + }, |
| 22 | + icon: { |
| 23 | + description: 'Object with the icon properties', |
| 24 | + type: { name: 'object' }, |
| 25 | + control: { type: 'object' }, |
| 26 | + table: { |
| 27 | + type: { |
| 28 | + summary: 'IElementOrIcon', |
| 29 | + }, |
| 30 | + category: CATEGORY_CONTROL.CONTENT, |
| 31 | + }, |
| 32 | + }, |
| 33 | + label: { |
| 34 | + description: 'Object with the label properties', |
| 35 | + control: { type: 'object' }, |
| 36 | + type: { name: 'object' }, |
| 37 | + table: { |
| 38 | + type: { |
| 39 | + summary: 'TagLabelType', |
| 40 | + }, |
| 41 | + category: CATEGORY_CONTROL.CONTENT, |
| 42 | + }, |
| 43 | + }, |
| 44 | + dataTestId: { |
| 45 | + description: 'Test id', |
| 46 | + type: { name: 'string' }, |
| 47 | + table: { |
| 48 | + type: { |
| 49 | + summary: 'string', |
| 50 | + }, |
| 51 | + defaultValue: { summary: 'tag' }, |
| 52 | + category: CATEGORY_CONTROL.TESTING, |
| 53 | + }, |
| 54 | + }, |
| 55 | + ctv: { |
| 56 | + description: 'Object used for update variant styles', |
| 57 | + type: { name: 'object' }, |
| 58 | + control: { type: 'object' }, |
| 59 | + table: { |
| 60 | + type: { |
| 61 | + summary: 'object', |
| 62 | + }, |
| 63 | + category: CATEGORY_CONTROL.CUSTOMIZATION, |
| 64 | + }, |
| 65 | + }, |
| 66 | + }; |
| 67 | +}; |
0 commit comments