mirror of
https://github.com/status-im/status-components.git
synced 2025-01-12 10:54:10 +00:00
Upgraded storybook to v5
Removed @material-ui/core dependency
This commit is contained in:
parent
06bf423d8f
commit
0809d53506
4
.gitignore
vendored
4
.gitignore
vendored
@ -19,3 +19,7 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# IDE
|
||||
.idea
|
||||
.vscode
|
||||
|
@ -1,10 +1,13 @@
|
||||
import { addDecorator, configure } from '@storybook/react';
|
||||
import { withOptions } from '@storybook/addon-options';
|
||||
import withBackgrounds from "@storybook/addon-backgrounds"
|
||||
import { addParameters, configure } from '@storybook/react';
|
||||
import { create } from '@storybook/theming';
|
||||
|
||||
addDecorator(
|
||||
withOptions({
|
||||
theme: {
|
||||
addParameters({
|
||||
backgrounds: [
|
||||
{ name: 'default', value: '#eef2f5', default: true },
|
||||
{ name: 'white', value: 'white' }
|
||||
],
|
||||
options: {
|
||||
theme: create({
|
||||
mainBackground: '#112 linear-gradient(to right, #112, #333)',
|
||||
mainBorder: '1px solid rgba(255,255,255,0.1)',
|
||||
mainBorderColor: 'rgba(255,255,255,0.1)',
|
||||
@ -25,16 +28,9 @@ addDecorator(
|
||||
layoutMargin: 10,
|
||||
overlayBackground:
|
||||
'linear-gradient(to bottom right, rgba(17, 17, 34, 0.6), rgba(51, 51, 51, 0.8))',
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
addDecorator(
|
||||
withBackgrounds([
|
||||
{ name: 'default', value: '#eef2f5', default: true },
|
||||
{ name: 'white', value: 'white' }
|
||||
])
|
||||
)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
function loadStories() {
|
||||
require('../src/stories')
|
||||
|
@ -8,4 +8,4 @@ First install dependencies:
|
||||
|
||||
Then start the dev mode:
|
||||
|
||||
`yarn build`
|
||||
`yarn storybook`
|
||||
|
32
package.json
32
package.json
@ -4,11 +4,11 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"classnames": "^2.2.6",
|
||||
"polished": "^2.2.0",
|
||||
"react": "^16.5.2",
|
||||
"react-dom": "^16.5.2",
|
||||
"react-scripts": "2.0.3",
|
||||
"styled-components": "^3.4.9",
|
||||
"polished": "^3.0.3",
|
||||
"react": "^16.8.4",
|
||||
"react-dom": "^16.8.4",
|
||||
"react-scripts": "2.1.8",
|
||||
"styled-components": "^4.1.3",
|
||||
"typeface-roboto": "0.0.54"
|
||||
},
|
||||
"scripts": {
|
||||
@ -21,17 +21,17 @@
|
||||
"deploy-storybook": "storybook-to-ghpages"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "^4.0.8",
|
||||
"@storybook/addon-backgrounds": "^4.0.8",
|
||||
"@storybook/addon-knobs": "^4.0.8",
|
||||
"@storybook/addon-links": "^4.0.8",
|
||||
"@storybook/addon-options": "^4.0.8",
|
||||
"@storybook/addon-viewport": "^4.0.8",
|
||||
"@storybook/addons": "^4.0.8",
|
||||
"@storybook/react": "^4.0.8",
|
||||
"@storybook/storybook-deployer": "^2.3.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-runtime": "^6.26.0"
|
||||
"@babel/core": "^7.3.4",
|
||||
"@storybook/addon-actions": "^5.0.1",
|
||||
"@storybook/addon-backgrounds": "^5.0.1",
|
||||
"@storybook/addon-knobs": "^5.0.1",
|
||||
"@storybook/addon-links": "^5.0.1",
|
||||
"@storybook/addon-options": "^5.0.1",
|
||||
"@storybook/addon-viewport": "^5.0.1",
|
||||
"@storybook/addons": "^5.0.1",
|
||||
"@storybook/react": "^5.0.1",
|
||||
"@storybook/storybook-deployer": "^2.8.1",
|
||||
"babel-loader": "^8.0.5"
|
||||
},
|
||||
"browserslist": [
|
||||
">0.2%",
|
||||
|
@ -2,12 +2,10 @@ import React from 'react'
|
||||
import 'typeface-roboto'
|
||||
|
||||
import { storiesOf } from '@storybook/react'
|
||||
import { action } from '@storybook/addon-actions'
|
||||
import { linkTo } from '@storybook/addon-links'
|
||||
import { withKnobs, text, boolean, number, object, select } from '@storybook/addon-knobs/react'
|
||||
|
||||
import { Welcome } from '@storybook/react/demo'
|
||||
import MobileButton from '../components/MobileButton'
|
||||
// import MobileButton from '../components/MobileButton'
|
||||
|
||||
storiesOf('Welcome', module)
|
||||
.add('To Status-Storybook', () => <StatusWelcome />)
|
||||
|
Loading…
x
Reference in New Issue
Block a user