Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: adds storybook * Remove yarn.lock from pr (too many conflicts) * Copy yarn.lock from current master :)
- Loading branch information
1 parent
a2475cc
commit 26e9929
Showing
7 changed files
with
105 additions
and
2 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 |
---|---|---|
|
@@ -5,4 +5,6 @@ compiled | |
coverage | ||
.DS_Store | ||
next.d.ts | ||
legacy.d.ts | ||
legacy.d.ts | ||
.idea | ||
*.orig |
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 @@ | ||
import { configure} from '@storybook/react'; | ||
|
||
function loadStories() { | ||
require('./example.stories'); | ||
} | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import {action, storiesOf, module} from '@storybook/react' | ||
import * as React from 'react' | ||
import AsyncValidation from '../examples/AsyncValidation' | ||
import Arrays from '../examples/Arrays' | ||
import Basic from '../examples/Basic.js' | ||
import CustomImputs from '../examples/CustomInputs' | ||
import MultistepWizard from '../examples/MultistepWizard' | ||
import SchemaValidation from '../examples/SchemaValidation' | ||
import SyncValidation from '../examples/SyncValidation' | ||
|
||
storiesOf('Example', module) | ||
.add('Basic', () => { | ||
return ( | ||
<div style={{}}> | ||
<Basic /> | ||
</div> | ||
) | ||
}) | ||
.add('Arrays', () => { | ||
return ( | ||
<div style={{}}> | ||
<Arrays /> | ||
</div> | ||
) | ||
}) | ||
.add('AsyncValidation', () => { | ||
return ( | ||
<div style={{}}> | ||
<AsyncValidation /> | ||
</div> | ||
) | ||
}) | ||
.add('CustomImputs', () => { | ||
return ( | ||
<div style={{}}> | ||
<CustomImputs /> | ||
</div> | ||
) | ||
}) | ||
.add('MultistepWizard', () => { | ||
return ( | ||
<div style={{}}> | ||
<MultistepWizard /> | ||
</div> | ||
) | ||
}) | ||
.add('SchemaValidation', () => { | ||
return ( | ||
<div style={{}}> | ||
<SchemaValidation /> | ||
</div> | ||
) | ||
}) | ||
.add('SyncValidation', () => { | ||
return ( | ||
<div style={{}}> | ||
<SyncValidation /> | ||
</div> | ||
) | ||
}) |
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 @@ | ||
const TsConfigPathsPlugin = require('awesome-typescript-loader').TsConfigPathsPlugin; | ||
|
||
module.exports = (storybookBaseConfig, configType, defaultConfig) => { | ||
|
||
|
||
defaultConfig.module.rules.push( | ||
{ | ||
test: /\.tsx?$/, | ||
exclude: /node_modules/, | ||
loader: 'awesome-typescript-loader', | ||
}, | ||
) | ||
defaultConfig.resolve.extensions = ['.ts', '.tsx', '.js', '.jsx'] | ||
defaultConfig.resolve.plugins = [ | ||
new TsConfigPathsPlugin({ | ||
tsconfig: 'tsconfig.json', | ||
compiler: 'typescript' | ||
}) | ||
] | ||
|
||
return defaultConfig | ||
|
||
} |
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 |
---|---|---|
|
@@ -169,3 +169,5 @@ const App = () => ( | |
</Wizard> | ||
</div> | ||
); | ||
|
||
export default App |
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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"include": ["src", "types", "test"] | ||
"include": ["src", "./typings.d.ts", "types", "test"], | ||
"compilerOptions": { | ||
"baseUrl": "./", | ||
"paths": { | ||
"formik": ["src/"] | ||
} | ||
} | ||
} |