import type { Meta, StoryObj } from '@storybook/react-vite'; import argTypes from '../../../.storybook/sgdsArgTypes'; import Card from './Card'; import ButtonGroup from '../Button/ButtonGroup'; import Button from '../Button'; import Metadata from '../PageMetadata'; import NotificationTag from '../NotificationTag'; // @ts-expect-error no types import coo from '../../../static/images/highland-cow.jpg'; const meta = { title: 'Components/Card', component: Card, argTypes: { children: argTypes.children(), tagName: { description: 'HTML tag name to use for the card', type: 'string' }, hasSecondaryBackground: { description: 'Sets the card to have a secondary background colour', control: 'boolean', }, href: { description: 'Href attribute for navigation card', type: 'string' }, isAdaptive: { description: 'Makes the card display a horizontal layout when the card itself is wider than mobile size', control: 'boolean', }, isHorizontal: { description: 'Makes the card display a horizontal layout at all times', control: 'boolean', }, isHorizontalSmall: { description: 'Makes the card display a horizontal layout when the viewport is at mobile size', control: 'boolean', }, }, args: { headingLevel: 'h2', tagName: 'div' } } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: (args) => ( ) }; export const SecondaryBackground: Story = { args: { hasSecondaryBackground: true }, render: (args) => ( ) }; export const NavigationCard: Story = { args: { href: '#foo' }, render: (args) => ( ) }; export const WithSummary: Story = { args: { href: '#foo' }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const DifferentHeadingLevel: Story = { args: { headingLevel: 'h4' }, render: (args) => ( ) }; export const DifferentContainerElement: Story = { args: { tagName: 'li' }, render: (args) => ( ) }; export const WithImage: Story = { args: { href: '#foo' }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const WithMetaData: Story = { args: { href: '#foo' }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

Statistics 18 June 2024
) }; export const WithButtons: Story = { render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const WithStatus: Story = { render: (args) => ( New release

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const WithIcon: Story = { render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const WithIconAndNotificationTag: Story = { render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const WithIconAndNotificationDot: Story = { render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const AdaptiveLayout: Story = { args: { href: '#foo', isAdaptive: true }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const HorizontalAlways: Story = { args: { href: '#foo', isHorizontal: true }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const HorizontalSmall: Story = { args: { href: '#foo', isHorizontalSmall: true }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const AspectBox: Story = { render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const NarrowImage: Story = { args: { href: '#foo', isAdaptive: true }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const WideImage: Story = { args: { href: '#foo', isAdaptive: true }, render: (args) => (

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

) }; export const AllOptions: Story = { args: { href: '#foo' }, render: (args) => ( New release

The Scottish Government Design System provides static web assets for websites and web applications for the Scottish Government and other Scottish public sector bodies.

Statistics 18 June 2024
) };