-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: timing issue with ploader plugin
- Loading branch information
1 parent
93148ac
commit d623be7
Showing
23 changed files
with
754 additions
and
190 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
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
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
14 changes: 0 additions & 14 deletions
14
examples/custom-pages-storybook-6/.storybook/canvas-page.tsx
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
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
13 changes: 8 additions & 5 deletions
13
...orybook-6/.storybook/page-docs-blocks.tsx → ...torybook-6/.storybook/page-docs-blocks.js
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
14 changes: 0 additions & 14 deletions
14
examples/custom-pages-storybook-6/.storybook/page-simple.tsx
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
examples/custom-pages-storybook-6/.storybook/page-story.js
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,20 @@ | ||
import React, { createElement } from 'react'; | ||
import { useStoryId, getContext } from '@component-controls/storybook-custom-docs'; | ||
|
||
const CustomPage = () => { | ||
//useStoryId so the function is refreshed on story change | ||
useStoryId(); | ||
return ( | ||
<div> | ||
<h1>Simple docs page</h1> | ||
{createElement(getContext().storyFn)} | ||
</div> | ||
); | ||
} | ||
const page = { | ||
key: 'custom', | ||
title: 'Simple Page', | ||
render: ({ active }) => active ? <CustomPage /> : null, | ||
} | ||
|
||
export default page; |
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,26 +1,42 @@ | ||
{ | ||
"name": "custom-pages-storybook-6", | ||
"private": true, | ||
"version": "1.0.1", | ||
"name": "component-controls-storybook-custom-docs-pages", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"debug": "NODE_OPTIONS=--inspect-brk start-storybook -p 9017 -c .storybook", | ||
"start": "webpack-dev-server --open --mode development", | ||
"storybook": "start-storybook -p 9017 -c .storybook", | ||
"build-storybook": "build-storybook -c .storybook -o ./docs" | ||
}, | ||
"dependencies": { | ||
"@component-controls/specification": "^1.0.1", | ||
"@component-controls/storybook": "^1.0.1", | ||
"@component-controls/storybook-custom-docs": "^1.0.1", | ||
"@storybook/addons": "6.0.0-alpha.28", | ||
"@storybook/addon-docs": "6.0.0-alpha.28", | ||
"@storybook/preset-typescript": "*", | ||
"@storybook/api": "6.0.0-alpha.28", | ||
"@storybook/client-api": "6.0.0-alpha.28", | ||
"@storybook/react": "6.0.0-alpha.28", | ||
"babel-loader": "^8.0.6", | ||
"babel-preset-react-app": "^9.0.0", | ||
"cross-env": "^5.2.0", | ||
"@babel/core": "^7.9.0", | ||
"@babel/preset-env": "^7.9.5", | ||
"@babel/preset-react": "^7.9.4", | ||
"babel-loader": "^8.1.0", | ||
"core-js": "^3.6.5", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.9.0", | ||
"react-dom": "^16.9.0", | ||
"typescript": "^3.8.3" | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1" | ||
}, | ||
"devDependencies": { | ||
"html-webpack-plugin": "^4.2.0", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.10.3" | ||
}, | ||
"babel":{ | ||
"presets" : [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
examples/custom-pages-storybook-6/src/components/Person.js
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,15 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
export const Person = ({ name, age }) => ( | ||
<div>{`My name is ${name} and I am ${age} years old`}</div> | ||
); | ||
|
||
Person.propTypes = { | ||
name: PropTypes.string, | ||
age: PropTypes.number, | ||
}; | ||
Person.defaultProps = { | ||
name: 'Martin', | ||
age: 22, | ||
}; |
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,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Create custom docs pages in storybookjs</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
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,8 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Person } from './components/Person'; | ||
|
||
ReactDOM.render( | ||
<Person />, | ||
document.getElementById("root") | ||
); |
11 changes: 11 additions & 0 deletions
11
examples/custom-pages-storybook-6/src/stories/person.stories.js
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,11 @@ | ||
import React from 'react'; | ||
import { Person } from '../components/Person'; | ||
|
||
export default { | ||
title: 'Stories/Person', | ||
component: Person | ||
} | ||
|
||
export const main = () => <Person /> | ||
|
||
export const custom = () => <Person age={55} name="Peter" /> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.