From 4beff43ebe879c58640cda6dd8c544ddc8253053 Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Thu, 1 Dec 2022 12:05:22 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(frontend)=20add=20storybook=20to=20re?= =?UTF-8?q?act=20repo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add storybook for the react repo, this will make developing components enjoyable ! It can also serve as a single source of thruth. --- packages/react/.storybook/main.cjs | 22 +++++++++++++++++++++ packages/react/.storybook/preview-head.html | 4 ++++ packages/react/.storybook/preview.cjs | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100644 packages/react/.storybook/main.cjs create mode 100644 packages/react/.storybook/preview-head.html create mode 100644 packages/react/.storybook/preview.cjs diff --git a/packages/react/.storybook/main.cjs b/packages/react/.storybook/main.cjs new file mode 100644 index 0000000..8d48ff4 --- /dev/null +++ b/packages/react/.storybook/main.cjs @@ -0,0 +1,22 @@ +module.exports = { + "stories": [ + "../src/**/*.stories.mdx", + "../src/**/*.stories.@(js|jsx|ts|tsx)" + ], + "addons": [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions", + '@storybook/preset-scss' + ], + "framework": "@storybook/react", + "core": { + "builder": "@storybook/builder-vite" + }, + staticDirs: [ + 'dist', + ], + "features": { + "storyStoreV7": true + } +} \ No newline at end of file diff --git a/packages/react/.storybook/preview-head.html b/packages/react/.storybook/preview-head.html new file mode 100644 index 0000000..0c1f803 --- /dev/null +++ b/packages/react/.storybook/preview-head.html @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/packages/react/.storybook/preview.cjs b/packages/react/.storybook/preview.cjs new file mode 100644 index 0000000..48afd56 --- /dev/null +++ b/packages/react/.storybook/preview.cjs @@ -0,0 +1,9 @@ +export const parameters = { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, +} \ No newline at end of file