From 8dc3ccbc94715843aba126a3388b02c3dae38b26 Mon Sep 17 00:00:00 2001 From: Jon McClure Date: Sun, 30 Jul 2023 13:12:52 +0100 Subject: [PATCH] #95 Headline --- src/components/@types/global.ts | 4 + .../Headline/Headline.stories.svelte | 20 +++-- src/components/Headline/Headline.svelte | 85 ++++++++++--------- .../Headline/stories/docs/withCrown.md | 2 +- 4 files changed, 65 insertions(+), 46 deletions(-) diff --git a/src/components/@types/global.ts b/src/components/@types/global.ts index d5f7d5c8..4990c95d 100644 --- a/src/components/@types/global.ts +++ b/src/components/@types/global.ts @@ -13,6 +13,10 @@ export type Option = { */ export type ContainerWidth = 'narrower' | 'narrow' | 'normal' | 'wide' | 'wider' | 'widest' | 'fluid'; +/** + * Used to set headline class fluid size from text-2xl to text-6xl + */ +export type HeadlineSize = 'small' | 'normal' | 'big' | 'bigger' | 'biggest'; /** * A step in the Scroller component. */ diff --git a/src/components/Headline/Headline.stories.svelte b/src/components/Headline/Headline.stories.svelte index 0caf4bee..d0c09215 100644 --- a/src/components/Headline/Headline.stories.svelte +++ b/src/components/Headline/Headline.stories.svelte @@ -19,13 +19,20 @@ withComponentDocs, withStoryDocs, } from '$lib/docs/utils/withParams.js'; + + const metaProps = { + ...withComponentDocs(componentDocs), + // https://storybook.js.org/docs/svelte/essentials/controls + argTypes: { + hedSize: { + control: 'select', + options: ['small', 'normal', 'big', 'bigger', 'biggest'], + }, + }, + }; - +