This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
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
344 changed files
with
7,815 additions
and
5,853 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
config | ||
coverage | ||
dist | ||
docs | ||
other | ||
scripts | ||
stories |
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 |
---|---|---|
|
@@ -29,3 +29,4 @@ config | |
scripts | ||
stories | ||
todos | ||
__tests__ |
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 +1 @@ | ||
v8.11.3 | ||
v8.11.4 |
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,4 +1,18 @@ | ||
{ | ||
"presets": ["es2015", "react", "stage-1"], | ||
"plugins": ["emotion"] | ||
"presets": ["es2015", "flow", "react", "stage-1"], | ||
"plugins": ["emotion", "transform-class-properties"], | ||
"env": { | ||
"development": { | ||
"presets": ["es2015", "flow", "react", "stage-1"], | ||
"plugins": ["emotion", "transform-class-properties", "inline-svg"] | ||
}, | ||
"production": { | ||
"plugins": [ | ||
"emotion", | ||
"transform-flow-strip-types", | ||
"transform-class-properties", | ||
"inline-svg" | ||
] | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,19 +1,10 @@ | ||
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ | ||
import { configure } from '@storybook/react' | ||
import '../src/styles/blue.scss' | ||
|
||
import React from 'react' | ||
import { addDecorator, configure } from '@storybook/react' | ||
// import { setOptions } from '@storybook/addon-options' | ||
|
||
const Docs = props => { | ||
return <div>{props.story()}</div> | ||
// automatically import all files ending in *.stories.js | ||
const req = require.context('../stories', true, /.stories.(js|ts|tsx)$/) | ||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)) | ||
} | ||
|
||
// setOptions({ | ||
// name: 'Blue', | ||
// url: 'https://github.com/helpscout/blue', | ||
// showDownPanel: false, | ||
// }) | ||
|
||
addDecorator(story => <Docs story={story} />) | ||
|
||
configure(() => require('../stories'), module) | ||
configure(loadStories, module) |
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,54 +1,36 @@ | ||
// you can use this file to add your custom webpack plugins, loaders and anything you like. | ||
// This is just the basic way to add additional webpack configurations. | ||
// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config | ||
|
||
// IMPORTANT | ||
// When you add this file, we won't add the default configurations which is similar | ||
// to "React Create App". This only has babel loader to load JavaScript. | ||
|
||
const path = require('path') | ||
const paths = require('../config/paths') | ||
const harvester = require('seed-harvester') | ||
const includePaths = harvester(['./src/scss']) | ||
|
||
module.exports = { | ||
plugins: [ | ||
// your custom plugins | ||
], | ||
module: { | ||
rules: [ | ||
// Process JS with Babel. | ||
module.exports = (baseConfig, env, config) => { | ||
// Typescript | ||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
loader: require.resolve('awesome-typescript-loader'), | ||
}) | ||
config.resolve.extensions.push('.ts', '.tsx') | ||
|
||
// SCSS | ||
config.module.rules.push({ | ||
test: /\.scss$/, | ||
include: paths.appSrc, | ||
use: [ | ||
{ | ||
test: /\.(js|jsx)$/, | ||
include: paths.appSrc, | ||
loader: require.resolve('babel-loader'), | ||
options: { | ||
cacheDirectory: true, | ||
}, | ||
loader: 'style-loader', | ||
}, | ||
// Sass | ||
{ | ||
test: /\.scss$/, | ||
include: paths.appSrc, | ||
use: [ | ||
{ | ||
loader: 'style-loader', | ||
}, | ||
{ | ||
loader: 'css-loader', | ||
}, | ||
{ | ||
loader: 'sass-loader', | ||
options: { | ||
includePaths, | ||
}, | ||
}, | ||
], | ||
loader: 'css-loader', | ||
}, | ||
// SVG | ||
{ | ||
test: /\.svg$/, | ||
loader: 'raw-loader', | ||
loader: 'sass-loader', | ||
options: { | ||
includePaths, | ||
}, | ||
}, | ||
], | ||
}, | ||
}) | ||
config.resolve.extensions.push('.scss') | ||
|
||
return config | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
beforeEach(() => { | ||
jest.spyOn(window, 'requestAnimationFrame').mockImplementation(cb => cb()) | ||
}) | ||
|
||
afterEach(() => { | ||
window.requestAnimationFrame.mockRestore() | ||
}) |
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
Oops, something went wrong.