mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Fixed Storybook arg types in Admin X DS
refs. https://github.com/TryGhost/Team/issues/3150 We are using ReactNode type parameters which can't be set directly in Storybook.
This commit is contained in:
parent
3c7dd63ec4
commit
2e42454f13
@ -1,7 +0,0 @@
|
||||
import { Meta } from '@storybook/blocks';
|
||||
|
||||
<Meta title="About / Install" />
|
||||
|
||||
# Install
|
||||
|
||||
Work in progress but should be something like `yarn add @tryghost/admin-x-ds`
|
@ -1,7 +1,11 @@
|
||||
import { Meta } from '@storybook/blocks';
|
||||
|
||||
<Meta title="About / Introduction" />
|
||||
<Meta title="About" />
|
||||
|
||||
# Welcome to Admin X Design System
|
||||
|
||||
Work in progress
|
||||
Work in progress!
|
||||
|
||||
## Install
|
||||
|
||||
Should be something like `yarn add @tryghost/admin-x-ds`
|
@ -7,18 +7,23 @@ const meta = {
|
||||
title: 'Global / Input / Dropdown',
|
||||
component: Dropdown,
|
||||
tags: ['autodocs'],
|
||||
decorators: [(_story: any) => (<div style={{maxWidth: '400px'}}>{_story()}</div>)]
|
||||
decorators: [(_story: any) => (<div style={{maxWidth: '400px'}}>{_story()}</div>)],
|
||||
argTypes: {
|
||||
help: {
|
||||
control: 'text'
|
||||
}
|
||||
}
|
||||
} satisfies Meta<typeof Dropdown>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof Dropdown>;
|
||||
|
||||
const dropdownOptions: DropdownOption[] = [
|
||||
{value: 'Option 1', label: 'option-1'},
|
||||
{value: 'Option 2', label: 'option-2'},
|
||||
{value: 'Option 3', label: 'option-3'},
|
||||
{value: 'Option 4', label: 'option-4'},
|
||||
{value: 'Option 5', label: 'option-5'}
|
||||
{value: 'option-1', label: 'Option 1'},
|
||||
{value: 'option-2', label: 'Option 2'},
|
||||
{value: 'option-3', label: 'Option 3'},
|
||||
{value: 'option-4', label: 'Option 4'},
|
||||
{value: 'option-5', label: 'Option 5'}
|
||||
];
|
||||
|
||||
export const Default: Story = {
|
||||
|
@ -6,7 +6,12 @@ const meta = {
|
||||
title: 'Global / Input / Textfield',
|
||||
component: TextField,
|
||||
tags: ['autodocs'],
|
||||
decorators: [(_story: any) => (<div style={{maxWidth: '400px'}}>{_story()}</div>)]
|
||||
decorators: [(_story: any) => (<div style={{maxWidth: '400px'}}>{_story()}</div>)],
|
||||
argTypes: {
|
||||
help: {
|
||||
control: 'text'
|
||||
}
|
||||
}
|
||||
} satisfies Meta<typeof TextField>;
|
||||
|
||||
export default meta;
|
||||
|
@ -5,7 +5,15 @@ import SettingValue from './SettingValue';
|
||||
const meta = {
|
||||
title: 'Settings / Setting Value',
|
||||
component: SettingValue,
|
||||
tags: ['autodocs']
|
||||
tags: ['autodocs'],
|
||||
argTypes: {
|
||||
value: {
|
||||
control: 'text'
|
||||
},
|
||||
help: {
|
||||
control: 'text'
|
||||
}
|
||||
}
|
||||
} satisfies Meta<typeof SettingValue>;
|
||||
|
||||
export default meta;
|
||||
|
Loading…
Reference in New Issue
Block a user