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

Commit

Permalink
Merge 2e5f1e8 into 6497dcf
Browse files Browse the repository at this point in the history
  • Loading branch information
tinkertrain committed Apr 24, 2019
2 parents 6497dcf + 2e5f1e8 commit 679c263
Show file tree
Hide file tree
Showing 5 changed files with 23,054 additions and 31,676 deletions.
1 change: 0 additions & 1 deletion .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@storybook/addon-options/register'
import '@storybook/addon-knobs/register'
import '@storybook/addon-actions/register'
import '@storybook/addon-viewport/register'
30 changes: 21 additions & 9 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react'
import { addDecorator, configure, addParameters } from '@storybook/react'
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
import { withOptions } from '@storybook/addon-options'
import { create } from '@storybook/theming'
import { withKnobs } from '@storybook/addon-knobs'
import { StatsGraph } from '@helpscout/stats'

import '../src/adapters/app'
import '../src/styles/blue.scss'
import './storybook.css'
Expand All @@ -17,21 +18,32 @@ const withStats = storyFn => (

addDecorator(withStats)
addDecorator(withKnobs)
addDecorator(
withOptions({
name: 'HSDS: React',
})
)

addParameters({
viewports: {
...INITIAL_VIEWPORTS,
options: {
theme: create({
base: 'light',
brandTitle: 'HSDS: React',
brandUrl:
'https://github.com/helpscout/hsds-react/tree/master/src/components',
}),
isFullscreen: false,
panelPosition: 'right',
isToolshown: true,
},
})

addParameters({
viewport: {
viewports: {
...INITIAL_VIEWPORTS,
},
},
})

// automatically import all files ending in *.stories.js
const req = require.context('../stories', true, /.stories.(js|ts|tsx)$/)
function loadStories() {
const req = require.context('../stories', true, /.stories.(js|ts|tsx)$/)
req.keys().forEach(filename => req(filename))
}

Expand Down
2 changes: 1 addition & 1 deletion .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const paths = require('../config/paths')
const harvester = require('seed-harvester')
const includePaths = harvester(['./src/scss'])

module.exports = (baseConfig, env, config) => {
module.exports = ({ config }) => {
// Typescript
config.module.rules.push({
test: /\.(ts|tsx)$/,
Expand Down

0 comments on commit 679c263

Please sign in to comment.