Skip to content

Commit 3364088

Browse files
authored
[UIE-181] Figma integration into Storybook (#4853)
1 parent f99cd4d commit 3364088

18 files changed

+282
-21
lines changed

.pnp.cjs

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

.storybook/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const config: StorybookConfig = {
2525
getAbsolutePath('@storybook/addon-onboarding'),
2626
getAbsolutePath('@storybook/addon-interactions'),
2727
getAbsolutePath('@storybook/addon-a11y'),
28+
getAbsolutePath('@storybook/addon-designs'),
2829
],
2930
framework: {
3031
name: getAbsolutePath('@storybook/react-vite'),
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"@pact-foundation/pact": "12.1.1",
8585
"@storybook/addon-a11y": "^8.0.10",
8686
"@storybook/addon-actions": "^8.0.0",
87+
"@storybook/addon-designs": "^8.0.2",
8788
"@storybook/addon-essentials": "^8.0.10",
8889
"@storybook/addon-interactions": "^8.0.10",
8990
"@storybook/addon-links": "^8.0.10",

src/stories/packages/components/ButtonOutline.stories.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ const meta: Meta<typeof ButtonOutline> = {
4646
export default meta;
4747
type Story = StoryObj<typeof ButtonOutline>;
4848

49-
export const Primary: Story = {
49+
export const Outline: Story = {
5050
args: {
5151
tooltip: 'This can provide additional context',
5252
children: 'Cancel',
5353
},
54+
parameters: {
55+
design: {
56+
type: 'figma',
57+
url: 'https://www.figma.com/file/fGlf8DGgTz5ec7phmzNUEN/Terra-Styles-%26-Components?node-id=30-1644&t=AexvAMYj4iUGF3lt-4',
58+
allowFullscreen: true,
59+
},
60+
},
5461
};

src/stories/packages/components/ButtonPrimary.stories.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,11 @@ export const Primary: Story = {
5959
tooltip: 'This can provide additional context',
6060
children: 'Cancel',
6161
},
62+
parameters: {
63+
design: {
64+
type: 'figma',
65+
url: 'https://www.figma.com/file/fGlf8DGgTz5ec7phmzNUEN/Terra-Styles-%26-Components?node-id=2-262&t=AexvAMYj4iUGF3lt-4',
66+
allowFullscreen: true,
67+
},
68+
},
6269
};

src/stories/packages/components/ButtonSecondary.stories.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ const meta: Meta<typeof ButtonSecondary> = {
4646
export default meta;
4747
type Story = StoryObj<typeof ButtonSecondary>;
4848

49-
export const Primary: Story = {
49+
export const Secondary: Story = {
5050
args: {
5151
tooltip: 'This can provide additional context',
5252
children: 'Cancel',
5353
},
54+
parameters: {
55+
design: {
56+
type: 'figma',
57+
url: 'https://www.figma.com/file/fGlf8DGgTz5ec7phmzNUEN/Terra-Styles-%26-Components?node-id=151-2135&t=AexvAMYj4iUGF3lt-4',
58+
allowFullscreen: true,
59+
},
60+
},
5461
};

0 commit comments

Comments
 (0)