Skip to content

Commit

Permalink
feat: Checkbox sidemenu's new tree format
Browse files Browse the repository at this point in the history
  • Loading branch information
shindigira committed Jan 25, 2024
1 parent dfd369d commit 6bbbf77
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
color: black;
}

/* Hide Checkbox Overview Extra Story */
div[data-item-id='components-verified-checkboxes--default'] {
display: none;
}
</style>
1 change: 0 additions & 1 deletion src/components/Checkbox/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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: 0 additions & 1 deletion src/components/Checkbox/CheckboxLarge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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
33 changes: 33 additions & 0 deletions src/components/Checkbox/CheckboxOverview.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* eslint-disable react/jsx-handler-names */
import type { Meta, StoryObj } from '@storybook/react';
import Checkbox from './Checkbox';
import { CheckboxWrapper } from './Checkbox.utils';

/**
Use checkboxes when the user can select more than one option from a list. Make clear with helper text that this is the case. Use [radio buttons](https://cfpb.github.io/design-system/components/radio-buttons) when the user can choose only one option from a list.
Source: https://cfpb.github.io/design-system/components/checkboxes
*/
const meta: Meta<typeof Checkbox> = {
title: 'Components (Verified)/Checkboxes',
tags: ['autodocs'],
component: Checkbox,
argTypes: {
disabled: { control: 'boolean' },
isLarge: { control: 'boolean' }
}
};

export default meta;

type Story = StoryObj<typeof meta>;

export const Default: Story = {
render: _arguments => CheckboxWrapper(_arguments),
name: 'Default',
args: {
id: 'default',
label: 'Default',
checked: false
}
};

0 comments on commit 6bbbf77

Please sign in to comment.