-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checkbox Sidemenu Updated, Checkbox States (Error/Warning/Success) (#287
) Closes #286 Closes #285 ## Changes - Checkbox - Storybook Sidemenu Update - Styling: Checkbox States (Error/Warning/Success) ## Screenshots (Updated 01/28/2024) ### Sidemenu Updated |Before|After| |---|---| |<img width="195" alt="Screenshot 2024-01-23 at 12 52 25 PM" src="https://github.com/cfpb/design-system-react/assets/13324863/10c24c26-e95d-4797-9f40-df693748a071">|<img width="1097" alt="Screenshot 2024-01-29 at 11 21 59 AM" src="https://github.com/cfpb/design-system-react/assets/13324863/09a78a6d-20cd-4cd8-a822-4d7a63fed95c">| ### New Checkbox Status <img width="148" alt="Screenshot 2024-01-23 at 12 54 16 PM" src="https://github.com/cfpb/design-system-react/assets/13324863/51ccbe5d-a264-4bac-afe9-da2ff5f2be78">
- Loading branch information
1 parent
d3888b7
commit 307f291
Showing
38 changed files
with
280 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*.mdx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,4 @@ | |
.sidebar-item svg { | ||
color: black; | ||
} | ||
|
||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* eslint-disable react/jsx-handler-names */ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import Checkbox from './Checkbox'; | ||
import { CheckboxWrapper } from './Checkbox.utils'; | ||
|
||
/** | ||
Source: https://cfpb.github.io/design-system/components/checkboxes | ||
*/ | ||
const meta: Meta<typeof Checkbox> = { | ||
title: 'Components (Verified)/Checkboxes/Large target area', | ||
tags: ['autodocs'], | ||
component: Checkbox, | ||
argTypes: { | ||
disabled: { control: 'boolean' }, | ||
isLarge: { control: 'boolean' } | ||
} | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Enabled: Story = { | ||
render: _arguments => CheckboxWrapper(_arguments), | ||
name: 'Enabled', | ||
args: { | ||
id: 'Enabled', | ||
label: 'Enabled', | ||
isLarge: true | ||
} | ||
}; | ||
|
||
export const Hover: Story = { | ||
render: _arguments => CheckboxWrapper(_arguments), | ||
name: 'Hover', | ||
args: { | ||
id: 'hover', | ||
label: 'Hover', | ||
inputClassName: 'hover', | ||
isLarge: true | ||
} | ||
}; | ||
|
||
export const Focus: Story = { | ||
render: _arguments => CheckboxWrapper(_arguments), | ||
name: 'Focus', | ||
args: { | ||
id: 'focus', | ||
label: 'Focus', | ||
inputClassName: 'focus', | ||
isLarge: true | ||
} | ||
}; | ||
|
||
export const Selected: Story = { | ||
render: _arguments => CheckboxWrapper(_arguments), | ||
name: 'Selected', | ||
args: { | ||
id: 'selected', | ||
label: 'Selected', | ||
isLarge: true, | ||
checked: true | ||
} | ||
}; | ||
|
||
export const Disabled: Story = { | ||
render: _arguments => CheckboxWrapper(_arguments), | ||
name: 'Disabled', | ||
args: { | ||
id: 'disabled', | ||
label: 'Disabled', | ||
isLarge: true, | ||
disabled: true | ||
} | ||
}; | ||
|
||
export const DisabledSelected: Story = { | ||
render: _arguments => CheckboxWrapper(_arguments), | ||
name: 'Disabled/Selected', | ||
args: { | ||
id: 'disabled/selected', | ||
label: 'Disabled/Selected', | ||
isLarge: true, | ||
disabled: true, | ||
checked: true | ||
} | ||
}; | ||
|
||
export const WithHelperText: Story = { | ||
render: _arguments => CheckboxWrapper(_arguments), | ||
name: 'With helper text', | ||
args: { | ||
id: 'withHelperText', | ||
label: 'Label', | ||
isLarge: true, | ||
helperText: 'This is optional helper text' | ||
} | ||
}; |
Oops, something went wrong.