diff --git a/.eslintrc.json b/.eslintrc.json index 7f56a58..bae8d23 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -48,6 +48,11 @@ { "html": "ignore" } + ], + "react/require-default-props": [ + "error", { + "functions" : "defaultArguments" + } ] } } diff --git a/.storybook/main.ts b/.storybook/main.ts index d98b990..5f559f5 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -14,5 +14,23 @@ const config: StorybookConfig = { options: {}, }, staticDirs: ['../public'], + webpackFinal: async (config) => { + config.module = config.module || {} + config.module.rules = config.module.rules || [] + const imageRule = config.module.rules.find((rule) => + // @ts-ignore + rule?.['test']?.test('.svg'), + ) + if (imageRule) { + // @ts-ignore + imageRule['exclude'] = /\.svg$/ + } + config.module.rules.push({ + test: /\.svg$/, + use: ['@svgr/webpack'], + }) + + return config + }, } export default config diff --git a/.storybook/preview-body.html b/.storybook/preview-body.html new file mode 100644 index 0000000..0288277 --- /dev/null +++ b/.storybook/preview-body.html @@ -0,0 +1 @@ +