From f93496cc21c0b57276363d999dd5f4eac563d591 Mon Sep 17 00:00:00 2001 From: Valerii Sidorenko Date: Tue, 16 Apr 2024 14:13:59 +0200 Subject: [PATCH] chore(storybook): fix Icon stories (#1514) --- src/components/Icon/__stories__/Icon.stories.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/components/Icon/__stories__/Icon.stories.tsx b/src/components/Icon/__stories__/Icon.stories.tsx index d81808c69c..d292cbddda 100644 --- a/src/components/Icon/__stories__/Icon.stories.tsx +++ b/src/components/Icon/__stories__/Icon.stories.tsx @@ -6,15 +6,9 @@ import type {Meta, StoryObj} from '@storybook/react'; import {Showcase} from '../../../demo/Showcase'; import {Icon} from '../Icon'; -const icons = [Gear, Envelope, Rocket].reduce( - (acc, fn) => { - acc[fn.name] = fn; - return acc; - }, - {} as {[key: string]: React.FunctionComponent}, -); +const icons = {Gear, Envelope, Rocket}; -export default { +const meta: Meta = { title: 'Components/Data Display/Icon', component: Icon, argTypes: { @@ -40,7 +34,9 @@ export default { }, }, }, -} as Meta; +}; + +export default meta; type Story = StoryObj;