Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade storybook #1308

Merged
merged 4 commits into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@storybook/addon-actions/register'
24 changes: 9 additions & 15 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
const { rules, loaders, plugins, stats } = require('webpack-atoms')
const { rules } = require('webpack-atoms')

const browsers = ['last 2 versions', 'ie >= 10']

module.exports = function(config) {
return {
...config,
module: {
rules: [
rules.js(),
rules.fonts(),
rules.images(),
rules.css(),
rules.less({ browsers }),
],
},
plugins: [...config.plugins],
}
module.exports = function({ config }) {
config.module.rules.push(rules.js())
config.module.rules.push(rules.fonts())
config.module.rules.push(rules.images())
config.module.rules.push(rules.css())
config.module.rules.push(rules.less({ browsers }))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will now use the default rules, which i don't think we want...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed an update to completely override the 'rules'. They did have a rule (from the @storybook/react package) already for the js compile, as well as some bits for handling media, but this new config more closely mirrors what you were doing before.


return config
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"@4c/rollout": "^1.2.0",
"@babel/cli": "^7.1.0",
"@babel/core": "^7.1.5",
"@storybook/addon-actions": "^4.1.7",
"@storybook/react": "^4.1.7",
"@storybook/addon-actions": "^5.0.11",
"@storybook/react": "^5.0.11",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
Expand Down
2 changes: 2 additions & 0 deletions src/addons/dragAndDrop/withDragAndDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default function withDragAndDrop(Calendar) {
onEventResize: PropTypes.func,
onDragStart: PropTypes.func,
onDragOver: PropTypes.func,
onDropFromOutside: PropTypes.func,

draggableAccessor: accessor,
resizableAccessor: accessor,
Expand All @@ -81,6 +82,7 @@ export default function withDragAndDrop(Calendar) {
resizable: PropTypes.bool,
components: PropTypes.object,
step: PropTypes.number,
elementProps: PropTypes.object,
}

static defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion stories/DragAndDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { action } from '@storybook/addon-actions'
import { events, Calendar, DragAndDropCalendar } from './helpers'
import customComponents from './helpers/customComponents'

storiesOf('Drag and Drop')
storiesOf('Drag and Drop', module)
.add('draggable and resizable', () => {
return (
<DragAndDropCalendar
Expand Down
2 changes: 1 addition & 1 deletion stories/Durations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import moment from 'moment'

import { Calendar, DragableCalendar } from './helpers'

storiesOf('Event Durations')
storiesOf('Event Durations', module)
.add('Daylight savings starts', () => {
return (
<DragableCalendar
Expand Down
2 changes: 1 addition & 1 deletion stories/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import moment from 'moment'
import { events, Calendar, DragAndDropCalendar } from './helpers'
import createEvents from './helpers/createEvents'

storiesOf('Layout Issues')
storiesOf('Layout Issues', module)
.add('event layout', () => {
return (
<Calendar
Expand Down
2 changes: 1 addition & 1 deletion stories/Resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { storiesOf } from '@storybook/react'
import { DragableCalendar } from './helpers'
import resources from './helpers/resourceEvents'

storiesOf('Resources').add('demo', () => (
storiesOf('Resources', module).add('demo', () => (
<DragableCalendar events={resources.events} resources={resources.list} />
))
Loading