Skip to content

Commit

Permalink
feat(documentation): fullwidth topic teaser docs (#2246)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidritter-dotcom authored Nov 14, 2023
1 parent dd0fa86 commit 895bd5b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { Canvas, Controls, Meta } from '@storybook/blocks';
import * as TopicTeaserStories from './topic-teaser.stories';
import StylesPackageImport from '../../../shared/styles-package-import.mdx';
import './topic-teaser.styles.scss';

<Meta of={TopicTeaserStories} />

<div className="hide-col-default container">

# Topic Teaser

<div className="lead">
Expand All @@ -13,9 +16,14 @@ import StylesPackageImport from '../../../shared/styles-package-import.mdx';

If you use multiple topic teasers on one page, each topic teaser must have a different background.

<Canvas sourceState="shown" of={TopicTeaserStories.Default} />
<div className="hide-col-default">
</div>

<Canvas className="topic-teaser-full-width-storybook" of={TopicTeaserStories.Default} />

<div className="hide-col-default container">
<Controls of={TopicTeaserStories.Default} />
</div>

<StylesPackageImport components={["topic-teaser"]} />
<div className="hide-col-default container">
<StylesPackageImport components={['topic-teaser']} />
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const meta: Meta = {
title: 'Components/Topic Teaser',
parameters: {
badges: [BADGE.NEEDS_REVISION],
layout: 'fullscreen',
},
args: {
title: 'Loremipsum',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@use '@swisspost/design-system-styles/core' as post;

.topic-teaser-full-width-storybook > div > div:first-child {
overflow: hidden;
@include post.responsive-size('huge', 'padding-bottom', 'calc($value + 2rem)');
}

0 comments on commit 895bd5b

Please sign in to comment.