import { Meta, StoryObj } from '@storybook/react-webpack5'; import { Button, withId, type WithIdProps } from '..'; type Story = StoryObj; type DescribedButtonProps = { id?: string }; type DescribedButtonWithIdProps = WithIdProps; function CustomButton({ id }: DescribedButtonWithIdProps) { return ( <>

Enter an amount in either GBP or PLN
This paragraph has id of {id}

); } const DescribedButton = withId(CustomButton); DescribedButton.displayName = 'DescribedButton'; export default { component: DescribedButton, title: 'HoCs/withId', tags: ['!manifest'], } satisfies Meta; export const WithoutId: Story = {}; export const WithCustomId: Story = { args: { id: 'myId', }, }; export const WithEmptyId: Story = { args: { id: '', }, };