-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30791 from Expensify/dangrous-updateradiochecks
Update Radio Checkbox Design
- Loading branch information
Showing
4 changed files
with
49 additions
and
10 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
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,36 @@ | ||
import React from 'react'; | ||
import RadioButtonWithLabel from '@components/RadioButtonWithLabel'; | ||
|
||
/** | ||
* We use the Component Story Format for writing stories. Follow the docs here: | ||
* | ||
* https://storybook.js.org/docs/react/writing-stories/introduction#component-story-format | ||
*/ | ||
const story = { | ||
title: 'Components/RadioButtonWithLabel', | ||
component: RadioButtonWithLabel, | ||
}; | ||
|
||
function Template(args) { | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
return <RadioButtonWithLabel {...args} />; | ||
} | ||
|
||
// Arguments can be passed to the component by binding | ||
// See: https://storybook.js.org/docs/react/writing-stories/introduction#using-args | ||
const Default = Template.bind({}); | ||
const Checked = Template.bind({}); | ||
Default.args = { | ||
isChecked: false, | ||
label: 'This radio button is unchecked', | ||
onInputChange: () => {}, | ||
}; | ||
|
||
Checked.args = { | ||
isChecked: true, | ||
label: 'This radio button is checked', | ||
onInputChange: () => {}, | ||
}; | ||
|
||
export default story; | ||
export {Default, Checked}; |
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