-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge with main and reduce code complexity etc.
- Loading branch information
1 parent
5d88a77
commit 44ecb3d
Showing
79 changed files
with
14,032 additions
and
4,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,5 @@ secrets.development.js | |
|
||
# IDEs | ||
.idea | ||
|
||
*storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const path = require('path'); | ||
const { NormalModuleReplacementPlugin } = require('webpack'); | ||
|
||
const config = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-webpack5-compiler-swc', | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
webpackFinal: webPackconfig => { | ||
const fileLoaderRule = webPackconfig.module.rules.find(rule => | ||
rule.test?.test('.svg'), | ||
); | ||
fileLoaderRule.exclude = /\.svg$/; | ||
webPackconfig.module.rules.push({ | ||
test: /\.svg$/i, | ||
issuer: /\.[jt]sx?$/, | ||
use: [ | ||
{ | ||
loader: '@svgr/webpack', | ||
options: { | ||
icon: true, | ||
exportType: 'named', | ||
}, | ||
}, | ||
], | ||
}); | ||
webPackconfig.resolve.extensions.push('.svg'); | ||
if (webPackconfig.plugins) { | ||
webPackconfig.plugins.push( | ||
new NormalModuleReplacementPlugin( | ||
/^webextension-polyfill$/, | ||
path.join(__dirname, './mocks/webextension-polyfill.mock.ts'), | ||
), | ||
); | ||
} | ||
|
||
return webPackconfig; | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const runtime = {}; | ||
export const storage = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import { Box, DarkMode, Flex, LightMode } from '@chakra-ui/react'; | ||
import Theme from '../src/ui/theme'; | ||
|
||
const preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export const decorators = [ | ||
(Story) => { | ||
return ( | ||
<Theme> | ||
<Flex> | ||
<LightMode> | ||
<Box p="50px"> | ||
<Story /> | ||
</Box> | ||
</LightMode> | ||
<DarkMode> | ||
<Box p="50px" backgroundColor="#2E2E2E"> | ||
<Story /> | ||
</Box> | ||
</DarkMode> | ||
</Flex> | ||
</Theme> | ||
); | ||
}, | ||
]; | ||
|
||
export default preview; |
Oops, something went wrong.