Skip to content

Commit

Permalink
small changes + changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
leagrdv committed Dec 24, 2024
1 parent 3a188b4 commit 360f577
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .changeset/three-geese-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-documentation': patch
'@swisspost/design-system-styles': patch
---

Internalized bootstrap text utilities into the design system.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ Transform text with the following text capitalization classes: `.text-lowercase`

### Decorations

Decorate text with the following text decoration classes.: `.text-decoration-line-through` and `.text-decoration-none`.
Decorate text with the following text decoration classes: `text-decoration-underline`, `.text-decoration-line-through` and `.text-decoration-none`.

<Canvas of={TextStories.TextDecoration} sourceState="shown" />
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { html } from 'lit';
import { schemes } from '@/shared/snapshots/schemes';
import meta from './text.stories';
import './text.styles.scss';
import { SCSS_VARIABLES } from './text.blocks';

const { id, ...metaWithoutId } = meta;

Expand All @@ -20,24 +21,25 @@ function getTextUtility(type: string) {
return html` ${['sans-serif'].map(val => html` <p class="font-${val}">Font ${val}</p> `)} `;
case 'Sizes':
return html`
${['1', '2', '3', '4', '5', '6'].map(
val => html` <p class="fs-${val}">Font size ${val}</p> `,
)}
${[1, 2, 3, 4, 5, 6].map(val => html` <p class="fs-${val}">Font size ${val}</p> `)}
`;
case 'Style':
return html`
${['italic', 'normal'].map(val => html` <p class="fst-${val}">Font style ${val}</p> `)}
${SCSS_VARIABLES.fontStyles.map(
(val: string) => html` <p class="fst-${val}">Font style ${val}</p> `,
)}
`;
case 'Weight':
return html`
${['lighter', 'light', 'normal', 'medium', 'semibold', 'bold', 'bolder'].map(
val => html` <p class="fw-${val}">Font weight ${val}</p> `,
${SCSS_VARIABLES.fontStyles.map(
(val: string) => html` <p class="fw-${val}">Font weight ${val}</p> `,
)}
`;
case 'Line height':
return html`
${['1', 'sm', 'base', 'lg'].map(
val => html` <p class="text-example-bordered lh-${val}">Line height ${val}</p> `,
${SCSS_VARIABLES.relativeLineHeights.map(
(val: string) =>
html` <p class="text-example-bordered lh-${val}">Line height ${val}</p> `,
)}
`;
case 'Text align':
Expand Down

0 comments on commit 360f577

Please sign in to comment.