Files
web/packages/design-system/lib/components/Chips/Chips.stories.tsx
Joakim Jäderberg f531c7a49f Merged in feature/storybook-tests (pull request #2623)
Feature/storybook tests

* feature: add interaction tests for storybook and upgrade storybook@9

* add a11y testing for storybook

* Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/storybook-tests

* Test and build only required packages

* .

* .

* .

* .

* .

* .

* .

* disable playwright tests in netlify ci

* .

* debug out process.env

* don't run playwright on CI

* remove unused netlify-plugin-playwright-cache

* .

* .

* .

* .

* .

* .

* remove turbo dependancy to design-system#test

* merge

* merge


Approved-by: Anton Gunnarsson
2025-08-14 06:25:08 +00:00

62 lines
2.0 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/react-vite'
import { fn } from 'storybook/test'
import { Chips } from './Chips.tsx'
import { ChipLink } from '../ChipLink/ChipLink.tsx'
import { ChipButton } from '../ChipButton/ChipButton.tsx'
import { Default as ChipLinkDefault } from '../ChipLink/ChipLink.stories.tsx'
import { Default as ChipButtonDefault } from '../ChipButton/ChipButton.stories.tsx'
type StoryProps = React.ComponentPropsWithoutRef<typeof Chips> & {
onPress: () => void
}
const meta: Meta<StoryProps> = {
title: 'Compositions/Chips',
component: Chips,
argTypes: {
onPress: {
table: {
disable: true,
},
},
},
}
export default meta
type Story = StoryObj<StoryProps>
export const Default: Story = {
args: {
onPress: fn(),
},
render: (args) => {
return (
<Chips>
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipLink {...ChipLinkDefault.args} {...args} />
<ChipButton {...ChipButtonDefault.args} {...args} />
</Chips>
)
},
}