Skip to content

Commit

Permalink
fix story mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
dhasilva committed Apr 18, 2024
1 parent be467bf commit c2d50a4
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default {
control: {
type: 'select',
},
options: {
options: [ 'None', 'Guideline message', 'Error message', 'Upgrade message' ],
mapping: {
None: null,
'Guideline message': <GuidelineMessage />,
'Error message': <ErrorMessage onTryAgainClick={ action( 'onTryAgainClick' ) } />,
Expand All @@ -45,7 +46,8 @@ export default {
control: {
type: 'select',
},
options: {
options: [ 'None', 'Accept button' ],
mapping: {
None: null,
'Accept button': <Button>Accept</Button>,
},
Expand All @@ -54,7 +56,8 @@ export default {
control: {
type: 'select',
},
options: {
options: [ 'None', 'Error notice' ],
mapping: {
None: null,
'Error notice': (
<Notice status="error" isDismissible={ true }>
Expand All @@ -71,7 +74,7 @@ export default {
},
};

const Template = args => {
const DefaultTemplate = args => {
const [ value, setValue ] = useState( '' );

const handleChange = ( newValue: string ) => {
Expand All @@ -94,5 +97,5 @@ const DefaultArgs = {
actions: null,
};

export const Default = Template.bind( {} );
export const Default = DefaultTemplate.bind( {} );
Default.args = DefaultArgs;

0 comments on commit c2d50a4

Please sign in to comment.