Skip to content

Commit

Permalink
feat: Added autodocs by tag
Browse files Browse the repository at this point in the history
  • Loading branch information
shindigira committed Jan 25, 2024
1 parent bba1246 commit dfd369d
Show file tree
Hide file tree
Showing 32 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'display-element-css'
],
docs: {
autodocs: true,
autodocs: 'tag',
defaultName: 'Overview'
},
framework: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Alert/Alert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { StatusType } from '../TextInput/TextInput';
const meta: Meta<typeof Alert> = {
title: 'Components (Draft)/Alerts',
component: Alert,
tags: ['autodocs'],
argTypes: {
message: { control: 'text' }
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Banner/Banner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AllLanguageCodes, LanguageLink } from './BannerLanguageLink';

const meta: Meta<typeof Banner> = {
title: 'Components (Verified)/Banner (US gov)',
tags: ['autodocs'],
component: Banner,
argTypes: {}
};
Expand Down
1 change: 1 addition & 0 deletions src/components/Buttons/Buttons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ButtonGroup } from './ButtonGroup';
const meta: Meta<typeof Button> = {
title: 'Components (Verified)/Buttons',
component: Button,
tags: ['autodocs'],
argTypes: {
appearance: { control: 'select' },
size: { control: 'select' },
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkbox/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Source: https://cfpb.github.io/design-system/components/checkboxes
const meta: Meta<typeof Checkbox> = {
title: 'Components (Verified)/Checkboxes/Checkbox',
component: Checkbox,
tags: ['autodocs'],
argTypes: {
disabled: { control: 'boolean' },
isLarge: { control: 'boolean' }
Expand Down
1 change: 1 addition & 0 deletions src/components/Checkbox/CheckboxLarge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Source: https://cfpb.github.io/design-system/components/checkboxes
const meta: Meta<typeof Checkbox> = {
title: 'Components (Verified)/Checkboxes/Large target area',
component: Checkbox,
tags: ['autodocs'],
argTypes: {
disabled: { control: 'boolean' },
isLarge: { control: 'boolean' }
Expand Down
1 change: 1 addition & 0 deletions src/components/Divider/Divider.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Divider } from '~/src/index';
const meta: Meta<typeof Divider> = {
title: 'Components (Draft)/Divider',
component: Divider,
tags: ['autodocs'],
parameters: {
docs: {
description: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Dropdown/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { MockOptions } from './utils';
*/
const meta: Meta<typeof Dropdown> = {
title: 'Components (Draft)/Dropdowns',
tags: ['autodocs'],
component: Dropdown
};

Expand Down
1 change: 1 addition & 0 deletions src/components/Expandable/Expandable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { sleep } from '../../utils/sleep';
const meta: Meta<typeof Expandable> = {
title: 'Components (Draft)/Expandable/Single',
component: Expandable,
tags: ['autodocs'],
parameters: {
docs: {
description: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Expandable/ExpandableGroup.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ExpandableGroup } from './ExpandableGroup';
const meta: Meta<typeof ExpandableGroup> = {
title: 'Components (Draft)/Expandable/Groups',
component: ExpandableGroup,
tags: ['autodocs'],
argTypes: {
accordion: { control: 'boolean' }
},
Expand Down
1 change: 1 addition & 0 deletions src/components/Footer/Footer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Footer, FooterCfGov, Icon } from '~/src/index';

const meta: Meta<typeof Footer> = {
title: 'Components (Draft)/Footers',
tags: ['autodocs'],
component: Footer,
argTypes: {}
};
Expand Down
1 change: 1 addition & 0 deletions src/components/Grid/Grid.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Grid } from '~/src/index';
const meta: Meta<typeof Grid.Wrapper> = {
title: 'Components (Draft)/Grids',
component: Grid.Wrapper,
tags: ['autodocs'],
parameters: {
docs: {
description: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Headings/Headings.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Heading } from '~/src/index';
*/
const meta: Meta<typeof Heading> = {
title: 'Components (Verified)/Headings',
tags: ['autodocs'],
component: Heading,
argTypes: {
type: { control: { type: 'select' } }
Expand Down
1 change: 1 addition & 0 deletions src/components/Hero/Hero.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Hero } from '~/src/index';
const meta: Meta<typeof Hero> = {
title: 'Components (Draft)/Heroes',
component: Hero,
tags: ['autodocs'],
parameters: {
docs: {
description: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {

const meta: Meta<typeof Icon> = {
title: 'Components (Draft)/Icons',
tags: ['autodocs'],
component: Icon,
parameters: {
docs: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Label/Label.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { TextInput } from '../TextInput/TextInput';

const meta: Meta<typeof Label> = {
title: 'Components (Verified)/Labels',
tags: ['autodocs'],
component: Label,
argTypes: {
inline: { control: 'boolean' }
Expand Down
1 change: 1 addition & 0 deletions src/components/Layout/LayoutContent.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Layout } from '~/src/index';

const meta: Meta<typeof Layout.Content> = {
title: 'Components (Draft)/Layout/Content',
tags: ['autodocs'],
component: Layout.Content,
parameters: {
docs: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Layout/LayoutMain.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Layout } from '~/src/index';

const meta: Meta<typeof Layout.Main> = {
title: 'Components (Draft)/Layout/Main',
tags: ['autodocs'],
component: Layout.Main,
parameters: {
docs: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Layout/LayoutSidebar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Layout } from '~/src/index';

const meta: Meta<typeof Layout.Sidebar> = {
title: 'Components (Draft)/Layout/Sidebar',
tags: ['autodocs'],
component: Layout.Sidebar,
parameters: {
docs: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Layout/LayoutWrapper.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Layout } from '~/src/index';

const meta: Meta<typeof Layout.Wrapper> = {
title: 'Components (Draft)/Layout/Wrapper',
tags: ['autodocs'],
component: Layout.Wrapper,
parameters: {
docs: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Link/Link.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {

const meta: Meta<typeof Link> = {
title: 'Components (Verified)/Links',
tags: ['autodocs'],
component: Link
};

Expand Down
1 change: 1 addition & 0 deletions src/components/List/List.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { List, ListItem, ListLink } from '~/src/index';

const meta: Meta<typeof List> = {
title: 'Components (Draft)/Lists',
tags: ['autodocs'],
component: List,
argTypes: {}
};
Expand Down
1 change: 1 addition & 0 deletions src/components/Navbar/Navbar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ExampleLinks } from './Navbar';

const meta: Meta<typeof Navbar> = {
title: 'Components (Draft)/Navbar',
tags: ['autodocs'],
component: Navbar,
argTypes: {}
};
Expand Down
1 change: 1 addition & 0 deletions src/components/PageHeader/PageHeader.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ExampleLinks } from '../Navbar/Navbar';

const meta: Meta<typeof PageHeader> = {
title: 'Components (Draft)/Page header',
tags: ['autodocs'],
component: PageHeader,
argTypes: {}
};
Expand Down
1 change: 1 addition & 0 deletions src/components/Pagination/Pagination.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { generateTestRows, stringify } from './Pagination.storyUtils';

const meta: Meta<typeof Pagination> = {
title: 'Components (Verified)/Pagination',
tags: ['autodocs'],
component: Pagination
};

Expand Down
1 change: 1 addition & 0 deletions src/components/Paragraph/Paragraphs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Paragraph } from './Paragraph';

const meta: Meta<typeof Paragraph> = {
title: 'Components (Verified)/Paragraphs',
tags: ['autodocs'],
component: Paragraph
};

Expand Down
1 change: 1 addition & 0 deletions src/components/RadioButton/RadioButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { RadioButton } from '~/src/index';
*/
const meta: Meta<typeof RadioButton> = {
title: 'Components (Verified)/Radio buttons',
tags: ['autodocs'],
component: RadioButton,
argTypes: {
disabled: { control: 'boolean' },
Expand Down
1 change: 1 addition & 0 deletions src/components/Table/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ONE } from '../Pagination/usePagination';

const meta: Meta<typeof Table> = {
title: 'Components (Verified)/Tables',
tags: ['autodocs'],
component: Table
};

Expand Down
1 change: 1 addition & 0 deletions src/components/Tagline/Tagline.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Tagline } from '~/src/index';

const meta: Meta<typeof Tagline> = {
title: 'Components (Verified)/Taglines',
tags: ['autodocs'],
component: Tagline,
parameters: {
docs: {
Expand Down
1 change: 1 addition & 0 deletions src/components/TextInput/TextInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Button, Icon, TextInput } from '~/src/index';

const meta: Meta<typeof TextInput> = {
title: 'Components (Draft)/Text inputs',
tags: ['autodocs'],
component: TextInput,
argTypes: {
isFullWidth: { control: 'boolean' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import placeholders from './testHelpers';

const meta: Meta<typeof TextIntroduction> = {
title: 'Components (Verified)/Text introductions',
tags: ['autodocs'],
component: TextIntroduction
};

Expand Down
1 change: 1 addition & 0 deletions src/components/Well/Well.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Link, WellContainer, WellContent } from '~/src/index';

const meta: Meta<typeof WellContainer> = {
title: 'Components (Verified)/Wells',
tags: ['autodocs'],
component: WellContainer,
argTypes: {
children: { type: 'string' }
Expand Down

0 comments on commit dfd369d

Please sign in to comment.