diff --git a/site/pages/components/headline.tsx b/site/pages/components/headline.tsx
index 6b22639a33..c8699c8287 100644
--- a/site/pages/components/headline.tsx
+++ b/site/pages/components/headline.tsx
@@ -43,7 +43,7 @@ const HeadlineComponent = (layoutProps: LayoutProps) => (
introduced: 'v0.19.0',
codeUrl:
'https://github.com/newscorp-ghfb/newskit/tree/main/src/headline',
- storybookId: 'components-headline--story-headline',
+ storybookId: 'components-headline--story-headline-default',
}}
interactiveDemo={{
introduction:
diff --git a/src/headline/__tests__/headline.stories.tsx b/src/headline/__tests__/headline.stories.tsx
index 9882bb0fe8..9ba882cfed 100644
--- a/src/headline/__tests__/headline.stories.tsx
+++ b/src/headline/__tests__/headline.stories.tsx
@@ -3,6 +3,8 @@ import {Story as StoryType} from '@storybook/react';
import {Headline} from '..';
import {ThemeProvider, CreateThemeArgs} from '../../theme';
import {createCustomThemeWithBaseThemeSwitch} from '../../test/theme-select-object';
+import {getColorCssFromTheme, styled} from '../../utils/style';
+import {StorybookCase, StorybookPage} from '../../test/storybook-comps';
const headlineCustomThemeObject: CreateThemeArgs = {
name: 'headline-custom-theme',
@@ -19,6 +21,7 @@ const headlineCustomThemeObject: CreateThemeArgs = {
borderRadius: '{{borders.borderRadiusSharp}}',
},
},
+ headlineCustom: {base: {color: '{{colors.inkBrand010}}'}},
linkInline: {
base: {
color: '{{colors.interactivePrimary030}}',
@@ -30,77 +33,256 @@ const headlineCustomThemeObject: CreateThemeArgs = {
},
};
-export const StoryHeadline = () => (
- <>
- Headline text with no kicker
-
-
- Headline text
-
-
- Headline as h3
-
-
-
- Headline overwritten preset
-
-
- (
+
+
+ Heading
+
+
+);
+StoryHeadlineDefault.storyName = 'Default';
+
+export const StoryHeadlineKicker = () => (
+
+
+
+ {HeadlineText}
+
+
+
+);
+StoryHeadlineKicker.storyName = 'Kicker';
+
+export const StoryHeadlineLogicalProps = () => (
+
+
+
+
+ {BODY}
+
+
+
+
+
+
+ {BODY}
+
+
+
+
+
+
+ {BODY}
+
+
+
+
+
+
+ {BODY}
+
+
+
+
+
+
+ {BODY}
+
+
+
+
+
+
+ {BODY}
+
+
+
+
+
+
+ {BODY}
+
+
+
+
+);
+StoryHeadlineLogicalProps.storyName = 'Logical props';
+
+export const StoryHeadlineStylingOverrides = () => (
+
+
+
- Heading Headline
-
-
-
- For Padding
-
-
-
- For Margin
-
- >
+ typographyPreset: 'utilityHeading050',
+ }}
+ >
+ {BODY}
+
+
+
+
+ {BODY}
+
+
+
+
+ {BODY}
+
+
+
+
+ {BODY}
+
+
+
+
+ {BODY}
+
+
+
+);
+StoryHeadlineStylingOverrides.storyName = 'Styling overrides';
+
+export const StoryHeadlineOverrides = () => (
+
+
+
+ {BODY}
+
+
+
);
-StoryHeadline.storyName = 'headline';
+StoryHeadlineOverrides.storyName = 'Overrides';
export default {
- title: 'Components/headline',
+ title: 'Components/Headline',
component: () => 'None',
+ parameters: {
+ nkDocs: {
+ title: 'Headline',
+ url: 'https://newskit.co.uk/components/headline/',
+ description:
+ 'Headline is used to highlight the main point or category of the following text.',
+ },
+ },
decorators: [
- (Story: StoryType, context: {globals: {backgrounds: {value: string}}}) => (
+ (
+ Story: StoryType,
+ context: {name: string; globals: {backgrounds: {value: string}}},
+ ) => (