/
dedaMazai
/
TestServer
Обзор
Документация
Войти
/
dedaMazai
/
TestServer
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/shared/ui/Code/Code.stories.tsx
30 строк
878 B
Andrey Chipizubov
fix
23 апр 2023, 17:32
23 апр 2023, 17:32
cc424e9
Код
Авторство
О чём код?
import React from 'react'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import { Code } from './Code'; export default { title: 'shared/Code', component: Code, argTypes: { backgroundColor: { control: 'color' }, }, } as ComponentMeta<typeof Code>; const Template: ComponentStory<typeof Code> = (args) => <Code {...args} />; export const Normal = Template.bind({}); Normal.args = { text: 'export default {\n' + " title: 'shared/Code',\n" + ' component: Code,\n' + ' argTypes: {\n' + " backgroundColor: { control: 'color' },\n" + ' },\n' + '} as ComponentMeta<typeof Code>;\n' + '\n' + 'const Template: ComponentStory<typeof Code> = (args) => <Code {...args} />;\n' + '\n' + 'export const Normal = Template.bind({});', };