forked from evmos/safe-web-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'v1.36.4' into feature/staging-rollout12-v1.36.4
- Loading branch information
Showing
465 changed files
with
17,298 additions
and
5,584 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: 'Build Storybook' | ||
|
||
description: 'Build the storybook' | ||
|
||
inputs: | ||
secrets: | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Build Storybook | ||
shell: bash | ||
run: yarn build-storybook -o ./out/storybook |
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import type { StorybookConfig } from '@storybook/nextjs' | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-themes', | ||
'@storybook/addon-designs' | ||
], | ||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {}, | ||
}, | ||
webpackFinal: async (config) => { | ||
config.module = config.module || {}; | ||
config.module.rules = config.module.rules || []; | ||
|
||
// This modifies the existing image rule to exclude .svg files | ||
// since you want to handle those files with @svgr/webpack | ||
const imageRule = config.module.rules.find((rule) => rule?.['test']?.test('.svg')); | ||
if (imageRule) { | ||
imageRule['exclude'] = /\.svg$/; | ||
} | ||
|
||
config.module.rules.push({ | ||
test: /\.svg$/i, | ||
issuer: { and: [/\.(js|ts|md)x?$/] }, | ||
use: [ | ||
{ | ||
loader: '@svgr/webpack', | ||
options: { | ||
prettier: false, | ||
svgo: false, | ||
svgoConfig: { | ||
plugins: [ | ||
{ | ||
name: 'preset-default', | ||
params: { | ||
overrides: { removeViewBox: false }, | ||
}, | ||
}, | ||
], | ||
}, | ||
titleProp: true, | ||
}, | ||
}, | ||
], | ||
}) | ||
|
||
return config; | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
staticDirs: ['../public'], | ||
|
||
typescript: { | ||
reactDocgen: 'react-docgen-typescript', | ||
reactDocgenTypescriptOptions: { | ||
// Speeds up Storybook build time | ||
compilerOptions: { | ||
allowSyntheticDefaultImports: false, | ||
esModuleInterop: false, | ||
}, | ||
// Makes union prop types like variant and size appear as select controls | ||
shouldExtractLiteralValuesFromEnum: true, | ||
// Makes string and boolean types that can be undefined appear as inputs and switches | ||
shouldRemoveUndefinedFromOptional: true, | ||
// Filter out third-party props from node_modules except @mui packages | ||
propFilter: (prop) => | ||
prop.parent ? !/node_modules\/(?!@mui)/.test(prop.parent.fileName) : true, | ||
}, | ||
}, | ||
} | ||
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,32 @@ | ||
import type { Preview } from '@storybook/react' | ||
|
||
import { ThemeProvider, CssBaseline } from '@mui/material' | ||
import { withThemeFromJSXProvider } from '@storybook/addon-themes' | ||
import createSafeTheme from '../src/components/theme/safeTheme' | ||
|
||
import '../src/styles/globals.css' | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
|
||
decorators: [ | ||
withThemeFromJSXProvider({ | ||
GlobalStyles: CssBaseline, | ||
Provider: ThemeProvider, | ||
themes: { | ||
light: createSafeTheme('light'), | ||
dark: createSafeTheme('dark'), | ||
}, | ||
defaultTheme: 'light', | ||
}), | ||
], | ||
} | ||
|
||
export default preview |
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
Oops, something went wrong.