Skip to content

Commit

Permalink
add primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
mollpo committed Sep 29, 2023
1 parent 25964ad commit f630551
Show file tree
Hide file tree
Showing 22 changed files with 635 additions and 745 deletions.
45 changes: 0 additions & 45 deletions src/components/form/primitive/Checkbox/Checkbox.stories.mdx

This file was deleted.

49 changes: 49 additions & 0 deletions src/components/form/primitive/Checkbox/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Meta, StoryObj } from '@storybook/react'
import {
Controls,
Description,
Primary,
Stories,
Subheading,
Title,
} from '@storybook/addon-docs'
import { Theme } from '../../../../../.storybook/components'
import { Checkbox } from './Checkbox'

const meta = {
component: Checkbox,
args: {
name: 'name',
label: 'Accept privacy policy',
disabled: false,
},
parameters: {
docs: {
page: () => (
<>
<Title />
<Description />
<Primary />
<Subheading>Props</Subheading>
<Controls />
<Theme component="form" items={['checkbox']} />
<Stories />
</>
),
},
},
} satisfies Meta<typeof Checkbox>

export default meta

type Story = StoryObj<typeof meta>

export const Default: Story = {}

export const WithLongMessage: Story = {
args: {
name: 'checkbox-w-long-text',
label:
'This checkbox has a very long text to show the behavior of a line break within the checkbox component. Adjust the width of the window to see the positioning of the elements within the component.',
},
}
39 changes: 0 additions & 39 deletions src/components/form/primitive/FieldSet.stories.mdx

This file was deleted.

44 changes: 44 additions & 0 deletions src/components/form/primitive/FieldSet.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {
Controls,
Description,
Primary,
Stories,
Subheading,
Title,
} from '@storybook/addon-docs'
import { Meta, StoryObj } from '@storybook/react'
import { Theme } from '../../../../.storybook/components'
import { FieldSet } from './index'

const meta = {
component: FieldSet,
args: {
label: 'Label',
children: <>FieldSet Content</>,
},
argTypes: {
disabled: { type: 'boolean' },
children: { control: { disable: true } },
},
parameters: {
docs: {
page: () => (
<>
<Title />
<Description />
<Primary />
<Subheading>Props</Subheading>
<Controls />
<Theme component="form" items={['fieldset']} />
<Stories />
</>
),
},
},
} satisfies Meta<typeof FieldSet>

export default meta

type Story = StoryObj<typeof meta>

export const Default: Story = {}
148 changes: 0 additions & 148 deletions src/components/form/primitive/Input.stories.mdx

This file was deleted.

Loading

0 comments on commit f630551

Please sign in to comment.