diff --git a/packages/components/src/icons/icons.stories.tsx b/packages/components/src/icons/icons.stories.tsx new file mode 100644 index 00000000..f864d1d5 --- /dev/null +++ b/packages/components/src/icons/icons.stories.tsx @@ -0,0 +1,48 @@ +import * as icons from '@status-im/icons' + +import { Text } from '../typography' + +import type { IconProps } from '@status-im/icons' +import type { Meta, StoryObj } from '@storybook/react' +import type React from 'react' + +// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction +const meta: Meta = { + title: 'icons', + // component: Button, + argTypes: {}, +} + +type Story = StoryObj + +function unpascal(str: string) { + return str.replace(/([A-Z])/g, ' $1').trim() +} + +// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args +export const All: Story = { + args: {}, + render: () => { + return ( +
+ {Object.keys(icons).map(name => { + // @ts-ignore + // eslint-disable-next-line import/namespace + const Icon = icons[name] as React.FunctionComponent + + return ( +
+ + {unpascal(name)} +
+ ) + })} +
+ ) + }, +} + +export default meta