Skip to content

Commit

Permalink
feat(ui-library): add figma plugin to storybook (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikdi authored Dec 20, 2023
1 parent dbcafa8 commit 35df4c3
Show file tree
Hide file tree
Showing 26 changed files with 399 additions and 254 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
"rimraf": "^5.0.5"
},
"engines": {
"node": "^18"
"node": "^18",
"yarn": "^4.0.2"
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion packages/ui-library/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { resolve } from 'path';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-designs'],
framework: '@storybook/web-components-webpack5',
docs: {
autodocs: true,
Expand Down
3 changes: 2 additions & 1 deletion packages/ui-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"license": "MIT",
"devDependencies": {
"@boiler/eslint-config-boiler": "1.0.0",
"@boiler/figma-design-tokens": "0.0.1"
"@boiler/figma-design-tokens": "0.0.1",
"@storybook/addon-designs": "^7.0.7"
},
"dependencies": {
"@boiler/icons": "0.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A106388&mode=dev',
},
layout: 'centered',
viewMode: 'docs',
docs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=705%3A1815&mode=dev',
},
viewMode: 'docs',
docs: {
description: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A126742&mode=dev',
},
layout: 'centered',
docs: {
description: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export default {
control: { type: 'select' },
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A126744&mode=dev',
},
},
};

export const BlrTooltip = (params: BlrTooltipType) => html`<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export default {
control: { type: 'select' },
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A126744&mode=dev',
},
},
};

export const BlrTooltipBubble = (params: BlrTooltipBubbleType) => html`<div style="position: relative; height: 200px;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125200&mode=dev',
},
layout: 'centered',
docs: {
//Two examples for Code integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=7155%3A108301&mode=dev',
},
viewMode: 'docs',
layout: 'centered',
docs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export default {
control: { type: 'select' },
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125199&mode=dev',
},
},
};

export const BlrRadioGroup = (params: BlrRadioGroupType) => BlrRadioGroupRenderFunction(params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125199&mode=dev',
},
viewMode: 'docs',
layout: 'centered',
docs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125198&mode=dev',
},
layout: 'centered',
viewMode: 'docs',
docs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ export default {
},

parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125196&mode=dev',
},
viewMode: 'docs',
previewTabs: {
'storybook/story/panel': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125197&mode=dev',
},
layout: 'centered',
docs: {
//Two examples for Code integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export default {
control: { type: 'select' },
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125201&mode=dev',
},
},
};

export const BlrToggleSwitch = (params: BlrToggleSwitchType) => BlrToggleSwitchRenderFunction(params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A126743&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125223&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=8273%3A7564&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A125225&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3231%3A94377&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3777%3A114816&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A127845&mode=dev',
},
previewTabs: {
canvas: { hidden: true },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=3618%3A106388&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
4 changes: 4 additions & 0 deletions packages/ui-library/src/components/ui/icon/index.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default {
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/C4vgEKz8mKyulJ4gm3Qdql/%F0%9F%AB%A7-%5BBLR%5D-The-B01LER?node-id=947%3A31105&mode=dev',
},
viewMode: 'docs',
},
};
Expand Down
Loading

0 comments on commit 35df4c3

Please sign in to comment.