/
sdds
/
plasma
Обзор
Документация
Войти
/
sdds
/
plasma
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
dev
utils/plasma-sb-utils/src/components/Tree/meta.ts
78 строк
2 KB
Dima Shugaev
feat(*): Spinner size correction
10 фев 2026, 15:51
10 фев 2026, 15:51
bc248e5
Код
Авторство
О чём код?
import { disableProps, InSpacingDecorator } from '../..'; import { arrowPlacements, mode, variant } from './fixtures'; type CreateMetaProps = { component: any; componentConfig: any; defaultArgs?: {}; additionalArgTypes?: {}; disablePropsList?: string[]; }; export const createMeta = ({ component, componentConfig, defaultArgs = {}, additionalArgTypes = {}, disablePropsList = [], }: CreateMetaProps) => { return { decorators: [InSpacingDecorator], component, argTypes: { size: { control: 'select', options: componentConfig.sizes, }, checkable: { control: 'boolean', }, multiple: { control: 'boolean', }, arrowPlacement: { options: arrowPlacements, control: { type: 'inline-radio', }, }, defaultExpandAll: { control: 'boolean', }, fullWidthItemSelection: { control: 'boolean', }, height: { control: 'number', }, hasIcon: { control: 'boolean', }, mode: { control: 'select', options: mode, }, variant: { control: 'select', options: variant, }, ...additionalArgTypes, ...disableProps([...disablePropsList]), }, args: { size: 'm', fullWidthItemSelection: false, singleLine: true, checkable: false, multiple: false, arrowPlacement: 'left', defaultExpandAll: true, height: undefined, hasIcon: true, mode: 'default', variant: 'normal', ...defaultArgs, }, }; };