Skip to content

Commit dd83c98

Browse files
committed
Fixed broken stories.
1 parent 965be2e commit dd83c98

File tree

1 file changed

+6
-6
lines changed
  • x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/control_panel

1 file changed

+6
-6
lines changed

x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/control_panel/index.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ addDecorator((storyFn) => (
1515
<ThemeProvider theme={() => ({ eui: euiLightVars, darkMode: false })}>{storyFn()}</ThemeProvider>
1616
));
1717

18-
const useRenderStory = (state: ControlPanelProps['state']) => {
19-
const [selectedOption, setSelectedOption] = useState<ViewType>(state.currentViewType);
18+
const useRenderStory = (props: Omit<ControlPanelProps, 'onViewTypeChange'>) => {
19+
const [selectedOption, setSelectedOption] = useState<ViewType>(props.currentViewType);
2020

2121
return (
2222
<ControlPanel
23-
state={{ ...state, currentViewType: selectedOption }}
23+
{...{ ...props, currentViewType: selectedOption }}
2424
onViewTypeChange={setSelectedOption}
2525
/>
2626
);
2727
};
2828

2929
storiesOf('TrustedApps/ControlPanel', module)
3030
.add('list view selected', () => {
31-
return useRenderStory({ totalItemsCount: 0, currentViewType: 'list' });
31+
return useRenderStory({ totalItemCount: 0, currentViewType: 'list' });
3232
})
3333
.add('plural totals', () => {
34-
return useRenderStory({ totalItemsCount: 200, currentViewType: 'grid' });
34+
return useRenderStory({ totalItemCount: 200, currentViewType: 'grid' });
3535
})
3636
.add('singular totals', () => {
37-
return useRenderStory({ totalItemsCount: 1, currentViewType: 'grid' });
37+
return useRenderStory({ totalItemCount: 1, currentViewType: 'grid' });
3838
});

0 commit comments

Comments
 (0)