From 8dc1b40e8e4e97fc991836e92462fdae1431fc29 Mon Sep 17 00:00:00 2001 From: Douglas Date: Thu, 18 Apr 2024 14:09:18 -0300 Subject: [PATCH] fix story mapping --- .../components/ai-control/stories/index.stories.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/projects/js-packages/ai-client/src/components/ai-control/stories/index.stories.tsx b/projects/js-packages/ai-client/src/components/ai-control/stories/index.stories.tsx index dc8d8f03d3279..49094e94046af 100644 --- a/projects/js-packages/ai-client/src/components/ai-control/stories/index.stories.tsx +++ b/projects/js-packages/ai-client/src/components/ai-control/stories/index.stories.tsx @@ -32,7 +32,8 @@ export default { control: { type: 'select', }, - options: { + options: [ 'None', 'Guideline message', 'Error message', 'Upgrade message' ], + mapping: { None: null, 'Guideline message': , 'Error message': , @@ -45,7 +46,8 @@ export default { control: { type: 'select', }, - options: { + options: [ 'None', 'Accept button' ], + mapping: { None: null, 'Accept button': , }, @@ -54,7 +56,8 @@ export default { control: { type: 'select', }, - options: { + options: [ 'None', 'Error notice' ], + mapping: { None: null, 'Error notice': ( @@ -71,7 +74,7 @@ export default { }, }; -const Template = args => { +const DefaultTemplate = args => { const [ value, setValue ] = useState( '' ); const handleChange = ( newValue: string ) => { @@ -94,5 +97,5 @@ const DefaultArgs = { actions: null, }; -export const Default = Template.bind( {} ); +export const Default = DefaultTemplate.bind( {} ); Default.args = DefaultArgs;