feat(SW-3636): Storybook structure * New sections in Storybook sidebar * Group Storybook content files and add token files for spacing, border radius and shadows Approved-by: Joakim Jäderberg
57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
|
import { LinkList } from './index'
|
|
import { IconName } from '../Icons/iconName'
|
|
import type { LinkListItemProps } from './LinkListItem'
|
|
|
|
const meta: Meta<typeof LinkList> = {
|
|
title: 'Core Components/LinkList/LinkList',
|
|
component: LinkList,
|
|
argTypes: {},
|
|
}
|
|
|
|
export default meta
|
|
|
|
type Story = StoryObj<typeof LinkList>
|
|
|
|
const illustrationItems = [
|
|
{
|
|
text: 'First Link Item',
|
|
isExternal: false,
|
|
illustration: {
|
|
illustration: 'Granola' as IconName,
|
|
size: 'medium',
|
|
},
|
|
} as LinkListItemProps,
|
|
{
|
|
text: 'Second Link Item',
|
|
isExternal: true,
|
|
illustration: {
|
|
illustration: 'Coin' as IconName,
|
|
size: 'small',
|
|
},
|
|
} as LinkListItemProps,
|
|
]
|
|
|
|
const textItems = [
|
|
{
|
|
text: 'First Link Item',
|
|
isExternal: false,
|
|
} as LinkListItemProps,
|
|
{
|
|
text: 'Second Link Item',
|
|
isExternal: true,
|
|
} as LinkListItemProps,
|
|
]
|
|
|
|
export const IllustrationLinkList: Story = {
|
|
args: {
|
|
linkListItems: illustrationItems,
|
|
},
|
|
}
|
|
|
|
export const TextOnlyLinkList: Story = {
|
|
args: {
|
|
linkListItems: textItems,
|
|
},
|
|
}
|