-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 3424-component-text-link
- Loading branch information
Showing
17 changed files
with
485 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
--- | ||
|
||
Fixed the dropdown toggle in the example of the intranet header with a navigation bar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': minor | ||
--- | ||
|
||
Added paragraph style. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
--- | ||
|
||
Added paragraph element. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/documentation/src/stories/elements/paragraph/paragraph.docs.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Canvas, Controls, Meta } from '@storybook/blocks'; | ||
import * as ParagraphStories from './paragraph.stories'; | ||
import StylesPackageImport from '@/shared/styles-package-import.mdx'; | ||
|
||
<Meta of={ParagraphStories} /> | ||
|
||
<div className="docs-title"> | ||
# Paragraph | ||
|
||
<nav> | ||
<link-design of={JSON.stringify(ParagraphStories)}></link-design> | ||
</nav> | ||
</div> | ||
|
||
Default paragraph without size variants. | ||
|
||
<Canvas of={ParagraphStories.Default} sourceState="shown" /> |
37 changes: 37 additions & 0 deletions
37
packages/documentation/src/stories/elements/paragraph/paragraph.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { StoryObj, StoryFn, StoryContext } from '@storybook/web-components'; | ||
import { html } from 'lit'; | ||
import { MetaExtended } from '@root/types'; | ||
|
||
const meta: MetaExtended = { | ||
id: '7ecd87f1-de96-4e39-a057-ba1798eb69593', | ||
title: 'Foundations/Typography/Paragraph', | ||
parameters: { | ||
badges: [], | ||
design: { | ||
type: 'figma', | ||
url: 'https://www.figma.com/design/JIT5AdGYqv6bDRpfBPV8XR/Foundations-%26-Components-Next-Level?node-id=178-6713&node-type=frame&t=Zs4iDGVBTA88pChW-0', | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj; | ||
|
||
export const Default: Story = { | ||
decorators: [ | ||
(story: StoryFn, context: StoryContext) => html` <div>${story(context.args, context)}</div> `, | ||
], | ||
render: () => html` | ||
<p> | ||
This is a paragraph. It is a block of text that is separated from other blocks of text by a | ||
blank line. It is usually indented at the beginning of the first line. The first word of a | ||
paragraph is often indented more than the rest of the paragraph. | ||
</p> | ||
<p> | ||
This is a paragraph. It is a block of text that is separated from other blocks of text by a | ||
blank line. It is usually indented at the beginning of the first line. The first word of a | ||
paragraph is often indented more than the rest of the paragraph. | ||
</p> | ||
`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
@use 'reset'; | ||
@use 'body'; | ||
@use 'anchor'; | ||
@use 'paragraph'; | ||
@use 'heading'; | ||
@use 'fieldset-legend'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@use 'sass:map'; | ||
@use '../functions/tokens'; | ||
@use '../tokens/elements'; | ||
|
||
tokens.$default-map: elements.$post-paragraph; | ||
|
||
p { | ||
margin-block: tokens.get('paragraph-margin-block-start'); | ||
|
||
&:first-child { | ||
margin-block-start: 0; | ||
} | ||
|
||
&:last-child { | ||
margin-block-end: 0; | ||
} | ||
} |
Oops, something went wrong.