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
Steven Silvester
committed
Dec 4, 2019
1 parent
c55455c
commit 8b25fe2
Showing
7 changed files
with
3,908 additions
and
123 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,5 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
const req = require.context('../stories', true, /.stories.tsx$/); | ||
|
||
configure(req, 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "./", | ||
"allowSyntheticDefaultImports": true, | ||
"module": "es2015", | ||
"target": "es5", | ||
"lib": ["es6", "dom"], | ||
"sourceMap": true, | ||
"allowJs": false, | ||
"jsx": "react", | ||
"moduleResolution": "node", | ||
"rootDir": "../", | ||
"outDir": "dist", | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"declaration": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules"] | ||
} |
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,22 @@ | ||
const path = require('path'); | ||
const SRC_PATH = path.join(__dirname, '../src'); | ||
const STORIES_PATH = path.join(__dirname, '../stories'); | ||
|
||
//dont need stories path if you have your stories inside your src folder | ||
module.exports = ({ config }) => { | ||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
include: [SRC_PATH, STORIES_PATH], | ||
use: [ | ||
{ | ||
loader: require.resolve('awesome-typescript-loader'), | ||
options: { | ||
configFileName: './.storybook/tsconfig.json' | ||
} | ||
}, | ||
{ loader: require.resolve('react-docgen-typescript-loader') } | ||
] | ||
}); | ||
config.resolve.extensions.push('.ts', '.tsx'); | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current' | ||
} | ||
} | ||
] | ||
] | ||
}; |
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,25 @@ | ||
/** | ||
* Example story for styling a button. | ||
*/ | ||
import React from 'react'; | ||
import { action } from '@storybook/addon-actions'; | ||
import '@jupyterlab/application/style/index.css'; | ||
import '@jupyterlab/theme-light-extension/style/index.css'; | ||
import { Button } from '@blueprintjs/core/lib/cjs/components/button/buttons'; | ||
|
||
export default { | ||
component: Button, | ||
title: 'Button' | ||
}; | ||
|
||
export const text = () => ( | ||
<Button onClick={action('clicked')}>Hello Button</Button> | ||
); | ||
|
||
export const emoji = () => ( | ||
<Button onClick={action('clicked')}> | ||
<span role="img" aria-label="so cool"> | ||
😀 😎 👍 💯 | ||
</span> | ||
</Button> | ||
); |
Oops, something went wrong.