diff --git a/src/stories/components/Chip.stories.tsx b/src/stories/components/Chip.stories.tsx new file mode 100644 index 00000000..2e1d23dd --- /dev/null +++ b/src/stories/components/Chip.stories.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { Meta, StoryObj } from '@storybook/react'; +import { Chip } from 'src/views/components/common/Chip/Chip'; + +const meta = { + title: 'Components/Common/Chip', + component: Chip, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + argTypes: { + label: { control: 'text' }, + }, +} satisfies Meta; +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + label: 'QR', + }, +}; \ No newline at end of file diff --git a/src/views/components/common/Chip/Chip.tsx b/src/views/components/common/Chip/Chip.tsx new file mode 100644 index 00000000..7ffbee71 --- /dev/null +++ b/src/views/components/common/Chip/Chip.tsx @@ -0,0 +1,35 @@ +import classNames from 'classnames'; +import React from 'react'; +import Text from '../Text/Text'; +import styles from './Chip.module.scss'; + + +export const flags = ["WR", "QR", "GC", "CD", "E", "II"] + +interface Props { + label: string; +} + +/** + * A reusable chip component that follows the design system of the extension. + * @returns + */ +export function Chip({ + label +}: React.PropsWithChildren): JSX.Element { + return ( + + {label} + + ); +}