415ce5efd8
1. move translation, connection, query to core (#729) 2. update encodable to remove formatter inter-dependency (#744) 3. move number-format and time-format to core (#730) 4. move superset-ui/dimension to core (#732) 5. move superset-ui/color to core (#755) 6. move superset-ui/style to core (#756) 7. move superset-ui/validator to core (#757) 8. move superset-ui/chart-composition to core (#759) 9. move superset-ui/chart to core (#760) |
||
---|---|---|
.. | ||
.storybook | ||
storybook/stories/legacy-plugin-chart-word-cloud | ||
package.json | ||
README.md |
@superset-ui/demo
Storybook of @superset-ui-plugins
packages. See it live at
apache-superset.github.io/superset-ui-plugins
Development
Run storybook
To view the storybook locally, you should:
- Clone superset-ui-plugins repo.
- Run
yarn install && yarn build
in thesuperset-ui-plugins
root directory. - Change to the demo directory
cd packages/superset-ui-plugins-demo
. - Run
yarn run storybook
. This will open up a dev server at http://localhost:9001.
Adding new stories
Existing package
If stories already exist for the package you are adding, simply extend the examples
already
exported for that package in the storybook/stories/<package>/index.js
file.
New package
If you are creating stories for a package that doesn't yet have any stories, follow these steps:
-
Add any new package dependencies via
yarn add <package>
, but if it is@superset-ui/*
packages, manually add it topeerDependencies
. -
Create a new folder that mirrors the package name
e.g.,
mkdir storybook/stories/superset-ui-color/
-
Add an
index.js
file to that folder with a default export with the following shape:
you can use the
|
separator within thestoryPath
string to denote nested stories e.g.,storyPath: '@superset-ui/package|Nested i|Nested ii'
default export {
examples: [
{
storyPath: <string>,
storyName: <string>,
renderStory: <func> () => node,
},
...
]
};