components and tailwind rework

This commit is contained in:
Henri
2026-03-05 16:43:56 +02:00
parent 4571d22644
commit 1b704c7cc4
19 changed files with 257 additions and 373 deletions

View File

@@ -1,51 +0,0 @@
import Icon from '../components/Svg.svelte';
export default {
title: 'SVG/Icon',
component: Icon,
argTypes: {
type: { control: { type: 'select', options: ['connector','mirrorV','mirrorH','mirrorVH','branch','branchH'] } },
className: { control: 'text' },
},
};
const Template = (args) => ({
Component: Icon,
props: args,
});
export const Default = Template.bind({});
Default.args = {
type: 'connector',
className: 'w-64 text-cyan-500',
};
export const MirrorV = Template.bind({});
MirrorV.args = {
type: 'mirrorV',
className: 'w-64 text-green-500',
};
export const MirrorH = Template.bind({});
MirrorH.args = {
type: 'mirrorH',
className: 'w-64 text-yellow-500',
};
export const MirrorVH = Template.bind({});
MirrorVH.args = {
type: 'mirrorVH',
className: 'w-64 text-pink-500',
};
export const Branch = Template.bind({});
Branch.args = {
type: 'branch',
className: 'w-48 text-magenta-500',
};
export const BranchH = Template.bind({});
BranchH.args = {
type: 'branchH',
className: 'w-48 text-magenta-500',
};

View File

@@ -0,0 +1,16 @@
<script context="module">
import { defineMeta } from '@storybook/addon-svelte-csf';
import Svg from '../components/Svg.svelte';
const { Story } = defineMeta({
title: 'Components/Svg',
component: Svg,
});
</script>
<Story name="connector" args={{ type: 'connector' }} />
<Story name="mirrorV" args={{ type: 'mirrorV' }} />
<Story name="mirrorH" args={{ type: 'mirrorH' }} />
<Story name="mirrorVH" args={{ type: 'mirrorVH' }} />
<Story name="branch" args={{ type: 'branch' }} />
<Story name="branchH" args={{ type: 'branchH' }} />