import type { Meta, StoryObj } from '@storybook/vue3' import FdsTableHead from './FdsTableHead.vue' const meta: Meta = { title: 'FDS/Table/FdsTableHead', component: FdsTableHead, tags: ['autodocs'], argTypes: { heading: { control: { type: 'text' } }, align: { control: { type: 'radio' }, options: ['left', 'center', 'right'] }, icon: { control: { type: 'select' }, options: ['sort', 'ascending', 'descending'] }, }, args: { heading: 'Namn', align: 'left', icon: 'sort', }, } export default meta type Story = StoryObj export const Default: Story = { render: (args: Story['args']) => ({ components: { FdsTableHead }, setup: () => ({ args }), template: ` Namn
Exempel data
`, }), } export const Sortable: Story = { render: (args: Story['args']) => ({ components: { FdsTableHead }, setup: () => ({ args }), template: ` Namn
Exempel data
`, }), } export const SortedAsc: Story = { args: { icon: 'ascending' }, render: (args: Story['args']) => ({ components: { FdsTableHead }, setup: () => ({ args }), template: ` Namn
Exempel data
`, }), } export const SortedDesc: Story = { args: { icon: 'descending' }, render: (args: Story['args']) => ({ components: { FdsTableHead }, setup: () => ({ args }), template: ` Namn
Exempel data
`, }), } export const CenterAligned: Story = { args: { align: 'center' }, render: (args: Story['args']) => ({ components: { FdsTableHead }, setup: () => ({ args }), template: ` Centrerad
Exempel data
`, }), } export const RightAligned: Story = { args: { align: 'right' }, render: (args: Story['args']) => ({ components: { FdsTableHead }, setup: () => ({ args }), template: ` Högerjusterad
Exempel data
`, }), }