Skip to content

Commit

Permalink
feat(plasma-b2c): add new typography sizes for Skeleton with snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanKuzmich committed Jan 9, 2024
1 parent d355ec5 commit d163e42
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions packages/plasma-b2c/src/components/Skeleton/LineSkeleton.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,74 @@ export const config = {
${skeletonTokens.lineHeight}: var(--plasma-typo-underline-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-underline-font-size);
`,
bodyL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-l-font-size);
`,
bodyM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-m-font-size);
`,
bodyS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-s-font-size);
`,
bodyXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-xs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-xs-font-size);
`,
bodyXXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-body-xxs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-body-xxs-font-size);
`,
dsplL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-l-font-size);
`,
dsplM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-m-font-size);
`,
dsplS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-dspl-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-dspl-s-font-size);
`,
h1: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h1-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h1-font-size);
`,
h2: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h2-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h2-font-size);
`,
h3: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h3-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h3-font-size);
`,
h4: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h4-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h4-font-size);
`,
h5: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-h5-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-h5-font-size);
`,
textL: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-l-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-l-font-size);
`,
textM: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-m-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-m-font-size);
`,
textS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-s-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-s-font-size);
`,
textXS: css`
${skeletonTokens.lineHeight}: var(--plasma-typo-text-xs-line-height);
${skeletonTokens.visibleLineHeight}: var(--plasma-typo-text-xs-font-size);
`,
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ const textSizes = [
'button2',
'caption',
'underline',
'bodyL',
'bodyM',
'bodyS',
'bodyXS',
'bodyXXS',
'dsplL',
'dsplM',
'dsplS',
'h1',
'h2',
'h3',
'h4',
'h5',
'textL',
'textM',
'textS',
'textXS',
];
const roundnessKeys = Object.keys(radiuses).map((r) => Number(r));

Expand Down
17 changes: 17 additions & 0 deletions packages/plasma-b2c/src/components/Skeleton/Skeleton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ const textSizes = [
'button2',
'caption',
'underline',
'bodyL',
'bodyM',
'bodyS',
'bodyXS',
'bodyXXS',
'dsplL',
'dsplM',
'dsplS',
'h1',
'h2',
'h3',
'h4',
'h5',
'textL',
'textM',
'textS',
'textXS',
];

const Default: StoryObj = {
Expand Down

0 comments on commit d163e42

Please sign in to comment.