03e84c1f28
Storybook (SvelteKit-Framework, Tailwind v4, MSW, Translation-Decorator): Stories für Atoms/Molecules/Organisms + alle CMS-Blocks. Button-Atom: 5 .btn-*-Varianten (primary/secondary/tertiary/outline/warning), class-Merge-Prop, href→<a>, Loading-Spinner neben Label, rounded-md/font-medium. Alle rohen .btn-*- und Hand-Style-Buttons app-weit aufs Atom migriert. SectionHeader-Molecule (kicker/number/title/subtitle/action) + Integration in 7 CMS-Blocks (post_overview, organisations, organisations_map, searchable_text, image_gallery, youtube_video_gallery, files) via neuem section_header-Schema. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/sveltekit';
|
|
import OrganisationsBlock from './OrganisationsBlock.svelte';
|
|
|
|
const CMS_ASSET =
|
|
'https://cms.pm86.de/api/assets/pages/img_2814-ar4x2.webp?_environment=windwiderstand';
|
|
|
|
const meta = {
|
|
title: 'CMS-Blocks/Organisations',
|
|
component: OrganisationsBlock,
|
|
tags: ['autodocs'],
|
|
argTypes: { block: { control: 'object' } },
|
|
} satisfies Meta<typeof OrganisationsBlock>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
const organisations = [
|
|
{
|
|
name: 'BI Steigerwald',
|
|
logo: { src: CMS_ASSET, description: 'Logo' },
|
|
description: 'Bürgerinitiative für den Erhalt des Waldes.',
|
|
link: { url: 'https://windwiderstand.de', linkName: 'Website', newTab: true },
|
|
location: { text: 'Schleusingen', lat: 50.5, lng: 10.75 },
|
|
},
|
|
{
|
|
name: 'Waldfreunde e.V.',
|
|
logo: { src: CMS_ASSET, description: 'Logo' },
|
|
description: 'Naturschutzverein der Region.',
|
|
link: { url: 'https://nabu.de', linkName: 'Website', newTab: true },
|
|
location: { text: 'Ebrach' },
|
|
},
|
|
];
|
|
|
|
export const Grid: Story = {
|
|
args: {
|
|
block: {
|
|
number: '03',
|
|
kicker: 'Vor Ort',
|
|
headline: 'Beteiligte Organisationen',
|
|
action: { url: '/adressbuch', linkName: 'Zum Adressbuch' },
|
|
presentation: 'default',
|
|
organisations,
|
|
},
|
|
},
|
|
};
|
|
|
|
export const Kompakt: Story = {
|
|
args: { block: { headline: 'Organisationen', presentation: 'compact', organisations } },
|
|
};
|
|
|
|
export const Carousel: Story = {
|
|
args: { block: { headline: 'Organisationen', presentation: 'carousel', organisations } },
|
|
};
|