-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
11,708 additions
and
15,932 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
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 |
---|---|---|
@@ -1,37 +1,45 @@ | ||
const { | ||
resolve | ||
} = require('path'); | ||
module.exports = { | ||
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-a11y/register", | ||
"@storybook/addon-viewport/register" | ||
], | ||
staticDirs: [{ from: '../src', to: '/public' }], | ||
webpackFinal: async config => { | ||
config.module.rules.push({ | ||
test: /\.scss$/, | ||
use: [{ | ||
loader: 'style-loader' | ||
}, { | ||
loader: 'css-loader', | ||
options: { | ||
modules : "icss" | ||
}, | ||
}, { | ||
loader: 'sass-loader' | ||
}], | ||
include: resolve(__dirname, '../') | ||
}, { | ||
test: /\.fn\.ejs$/i, | ||
use: [{ loader: resolve(__dirname, './ejs-fn-loader.js') }], | ||
}); | ||
return config; | ||
}, | ||
framework: { | ||
name: "@storybook/html-webpack5", | ||
options: {} | ||
}, | ||
const { | ||
resolve | ||
} = require('path'); | ||
module.exports = { | ||
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"], | ||
|
||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-a11y/register", | ||
"@storybook/addon-viewport/register", | ||
"@storybook/addon-webpack5-compiler-swc", | ||
"@storybook/addon-mdx-gfm" | ||
], | ||
|
||
staticDirs: [{ from: '../src', to: '/public' }], | ||
|
||
webpackFinal: async config => { | ||
config.module.rules.push({ | ||
test: /\.scss$/, | ||
use: [{ | ||
loader: 'style-loader' | ||
}, { | ||
loader: 'css-loader', | ||
options: { | ||
modules : "icss" | ||
}, | ||
}, { | ||
loader: 'sass-loader' | ||
}], | ||
include: resolve(__dirname, '../') | ||
}, { | ||
test: /\.fn\.ejs$/i, | ||
use: [{ loader: resolve(__dirname, './ejs-fn-loader.js') }], | ||
}); | ||
return config; | ||
}, | ||
|
||
framework: { | ||
name: "@storybook/html-webpack5", | ||
options: {} | ||
}, | ||
|
||
docs: {} | ||
}; |
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 |
---|---|---|
@@ -1,47 +1,48 @@ | ||
import { withA11y } from '@storybook/addon-a11y' | ||
|
||
import '../scss/style.scss' | ||
|
||
const customViewports = { | ||
iPhone5: { | ||
name: 'iPhone5', | ||
styles: { | ||
width: '320px', | ||
height: '568px', | ||
}, | ||
}, | ||
iPhone6: { | ||
name: 'iPhone6,7,8', | ||
styles: { | ||
width: '375px', | ||
height: '667px', | ||
}, | ||
}, | ||
iPhoneX: { | ||
name: 'iPhoneX', | ||
styles: { | ||
width: '375px', | ||
height: '812px', | ||
}, | ||
}, | ||
iPhoneXsMax: { | ||
name: 'iPhoneXsMax', | ||
styles: { | ||
width: '414px', | ||
height: '896px', | ||
}, | ||
}, | ||
iPad: { | ||
name: 'iPad', | ||
styles: { | ||
width: '768px', | ||
height: '1024px', | ||
} | ||
} | ||
} | ||
|
||
export const parameters = { | ||
viewport: { viewports: customViewports }, | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
...withA11y | ||
} | ||
import { withA11y } from '@storybook/addon-a11y' | ||
|
||
import '../scss/style.scss' | ||
|
||
const customViewports = { | ||
iPhone5: { | ||
name: 'iPhone5', | ||
styles: { | ||
width: '320px', | ||
height: '568px', | ||
}, | ||
}, | ||
iPhone6: { | ||
name: 'iPhone6,7,8', | ||
styles: { | ||
width: '375px', | ||
height: '667px', | ||
}, | ||
}, | ||
iPhoneX: { | ||
name: 'iPhoneX', | ||
styles: { | ||
width: '375px', | ||
height: '812px', | ||
}, | ||
}, | ||
iPhoneXsMax: { | ||
name: 'iPhoneXsMax', | ||
styles: { | ||
width: '414px', | ||
height: '896px', | ||
}, | ||
}, | ||
iPad: { | ||
name: 'iPad', | ||
styles: { | ||
width: '768px', | ||
height: '1024px', | ||
} | ||
} | ||
} | ||
|
||
export const parameters = { | ||
viewport: { viewports: customViewports }, | ||
// actions: { argTypesRegex: "^on[A-Z].*" }, | ||
...withA11y | ||
} | ||
export const tags = ['autodocs']; |
Oops, something went wrong.