Skip to content

Commit dd1c418

Browse files
authored
docs: reuse candidate link stories (#1249)
closes: #1227
1 parent e95f8e6 commit dd1c418

File tree

3 files changed

+31
-85
lines changed

3 files changed

+31
-85
lines changed

packages/voorbeeld-design-tokens/documentation/link/nl-link.stories.tsx

Lines changed: 10 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,26 @@
1-
import { Meta, StoryObj } from '@storybook/react';
2-
import { Link } from '@nl-design-system-candidate/link-react/css';
1+
import { Meta } from '@storybook/react';
2+
import * as Stories from '@nl-design-system-candidate/link-docs/stories/link.stories';
3+
import reactMeta from '@nl-design-system-candidate/link-docs/stories/link.react.meta';
34

45
const meta = {
56
id: 'nl-link',
67
title: 'Components/Link/Candidate',
7-
component: Link,
88
parameters: { actions: { disable: true } },
9-
args: {
10-
children: 'Lees meer',
11-
href: 'https://www.example.com',
12-
},
13-
argTypes: {
14-
external: {
15-
name: 'external',
16-
type: { name: 'boolean', required: false },
17-
table: {
18-
category: 'API',
19-
defaultValue: { summary: 'false' },
20-
},
21-
},
22-
href: {
23-
name: 'href',
24-
type: { name: 'string', required: false },
25-
table: {
26-
category: 'HTML attribute',
27-
defaultValue: { summary: '' },
28-
},
29-
},
30-
'aria-current': {
31-
name: 'aria-current',
32-
type: { name: 'string', required: false },
33-
options: [undefined, 'page', 'step', 'location', 'date', 'time', 'true', 'false'],
34-
table: {
35-
category: 'HTML attribute',
36-
defaultValue: { summary: '' },
37-
},
38-
},
39-
hrefLang: {
40-
name: 'hrefLang',
41-
type: { name: 'string', required: false },
42-
table: {
43-
category: 'HTML attribute',
44-
defaultValue: { summary: '' },
45-
},
46-
},
47-
lang: {
48-
name: 'lang',
49-
type: { name: 'string', required: false },
50-
table: {
51-
category: 'HTML attribute',
52-
defaultValue: { summary: '' },
53-
},
54-
},
55-
placeholder: {
56-
name: 'placeholder',
57-
type: { name: 'boolean', required: false },
58-
table: {
59-
category: 'API',
60-
defaultValue: { summary: '' },
61-
},
62-
},
63-
rel: {
64-
name: 'rel',
65-
type: { name: 'string', required: false },
66-
table: {
67-
category: 'HTML attribute',
68-
defaultValue: { summary: '' },
69-
},
70-
},
71-
target: {
72-
name: 'target',
73-
type: { name: 'string', required: false },
74-
table: {
75-
category: 'HTML attribute',
76-
defaultValue: { summary: '' },
77-
},
78-
},
79-
},
80-
} satisfies Meta<typeof Link>;
9+
...reactMeta,
10+
} satisfies Meta;
8111

8212
export default meta;
83-
type Story = StoryObj<typeof meta>;
8413

85-
export const VoorbeeldTheme: Story = {
14+
export const VoorbeeldTheme = {
15+
...Stories.Link,
8616
name: 'Voorbeeld theme',
8717
parameters: {
8818
theme: 'voorbeeld-theme',
8919
},
9020
};
91-
export const BasisTheme: Story = {
21+
22+
export const BasisTheme = {
23+
...Stories.Link,
9224
name: 'Start theme',
9325
parameters: {
9426
theme: 'start-theme',

packages/voorbeeld-design-tokens/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@gemeente-denhaag/icons": "3.1.0",
3636
"@gemeente-denhaag/side-navigation": "3.1.0",
3737
"@lux-design-system/web-components-react": "1.1.0",
38+
"@nl-design-system-candidate/link-docs": "1.2.0",
3839
"@nl-design-system-community/design-tokens-definition": "workspace:*",
3940
"@nl-design-system-unstable/design-tokens-table-react": "workspace:*",
4041
"@nl-design-system-unstable/theme-toolkit": "workspace:*",

pnpm-lock.yaml

Lines changed: 20 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)