Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Experiments: Testing with Storybook #39

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
jobs:
webassembly:
name: WebAssembly
if: false # DISABLED TEMPORARY
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -42,6 +43,7 @@ jobs:

web:
name: Web
if: false # DISABLED TEMPORARY
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ yarn-error.log*

# typescript
*.tsbuildinfo

# storybook
build-storybook.log
/storybook-static
28 changes: 28 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
stories: [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
{
name: '@storybook/addon-postcss',
options: {
cssLoaderOptions: {
// When the css files are splitted over multiple files
importLoaders: 1,
},
postcssLoaderOptions: {
// When using PostCSS v8
implementation: require('postcss'),
},
},
},
],
framework: '@storybook/react',
core: { builder: 'webpack5' },
staticDirs: ['../public'],
typescript: { reactDocgen: false },
}
11 changes: 11 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import '../src/styles/globals.css'

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
Loading