Skip to content

Commit

Permalink
chore(documentation): add package design-system-tokens on start page (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-tschiller committed Nov 14, 2024
1 parent fa93063 commit ae4aceb
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@swisspost/design-system-components-react": "workspace:9.0.0-next.4",
"@swisspost/design-system-icons": "workspace:9.0.0-next.4",
"@swisspost/design-system-styles": "workspace:9.0.0-next.4",
"@swisspost/design-system-tokens": "workspace:9.0.0-next.4",
"@swisspost/internet-header": "workspace:2.0.0-next.4",
"bootstrap": "5.3.3"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions packages/documentation/src/shared/packages.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import metaComponentsAngular from '@/stories/getting-started/packages/components
import metaInternetHeader from '@/stories/getting-started/packages/internet-header/internet-header.stories';
import metaIntranetHeader from '@/stories/getting-started/packages/intranet-header/intranet-header.stories';
import metaIcons from '@/stories/getting-started/packages/icons/package-icons.stories';
import metaTokens from '@/stories/getting-started/packages/tokens/tokens.stories';
import { PackageType } from '@/../types';

interface IPackage {
Expand Down Expand Up @@ -145,6 +146,26 @@ export const packages: IPackage[] = [
},
version: `v${getVersion(DEPENDENCIES['@swisspost/design-system-icons'])}`,
},
{
name: 'Tokens',
docsStoryId: metaTokens.id,
type: PackageType.Assets,
link: {
github: {
href: 'https://github.com/swisspost/design-system/tree/main/packages/tokens',
ariaLabel: 'Source of Tokens package',
},
docs: {
href: generateDocsRelativeLink(metaTokens.id),
ariaLabel: 'Getting started with Tokens package',
},
},
img: {
src: '/assets/images/packages/tokens.svg',
alt: '',
},
version: `v${getVersion(DEPENDENCIES['@swisspost/design-system-tokens'])}`,
},
];

function generateDocsRelativeLink(storyId: string) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { StoryObj } from '@storybook/web-components';
import { MetaExtended } from '@root/types';

const meta: MetaExtended = {
id: 'c0af5a11-2b2f-427d-9cd3-cc323f49e56e',
title: 'Getting Started/Packages/Tokens',
parameters: {
badges: [],
},
};

export default meta;

type Story = StoryObj;

export const Default: Story = {};
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae4aceb

Please sign in to comment.