hestia/src/lib/components/Layout/Divider.stories.svelte
Baobeld 54d4eaa058
Build out components (#45)
* move loader to Feedback

* fill out button props to match what is available on daisy

* links

* Alert component and InfoIcon

* Loading component

* Progress component

* lol wtf

* Tooltip component

* Skeleton component

* Divider component

* fix errors

* made this component early so i just fixed up some of the props
2025-01-04 22:14:19 -05:00

41 lines
942 B
Svelte

<script module lang="ts">
import { defineMeta } from '@storybook/addon-svelte-csf';
import Divider from './Divider.svelte';
import type { ComponentProps } from 'svelte';
const { Story } = defineMeta({
title: 'Layout/Divider',
component: Divider,
argTypes: {
color: {
control: 'select',
options: [
'neutral',
'primary',
'secondary',
'accent',
'info',
'success',
'warning',
'error',
],
},
direction: { control: 'select', options: ['horizontal', 'vertical'] },
variant: { control: 'select', options: ['start', 'end'] },
},
});
</script>
{#snippet template(props: ComponentProps<typeof Divider>)}
<div
class="flex"
class:flex-row={props.direction === 'horizontal'}
class:flex-col={props.direction === 'vertical'}
>
<span>Side A</span>
<Divider {...props} />
<span>Side B</span>
</div>
{/snippet}
<Story name="Default" args={{}} children={template} />