639c8bac74
* fix(plugin-chart-echarts): funnel rebase master * fix(plugin-chart-echarts): resize thumbnail for Funnel Chart * fix(plugin-chart-echarts): rm Funnel shape * fix(plugin-chart-echarts): don't need the sort_by_metric control * fix(plugin-chart-echarts): add sort and orient into Funnel shape * refactor: use sharedControls instead of controlOverrides * fix(plugin-chart-echarts): rm min/max args to use echarts default * style(plugin-chart-echarts): update funnel thumbnail * style(plugin-chart-echarts): rm unused properties * fix(plugin-chart-echarts): revert yarn.lock into then one from master * style(plugin-chart-echarts): add newline at the end of yarn.lock * style(plugin-chart-echarts): npm run format n * style(plugin-chart-echarts): inser final new line to yarn.lock * fix(demo): update funnel to Funnel * feat(plugin-chart-echarts): add cross-filter * feat(plugin-chart-echarts): add cross-filter |
||
---|---|---|
.. | ||
.storybook | ||
storybook | ||
.eslintrc | ||
package.json | ||
README.md | ||
tsconfig.json |
@superset-ui/demo
Storybook of @superset-ui
packages. See it live at
apache-superset.github.io/superset-ui
Development
Run storybook
To view the storybook locally, you should first run yarn install && yarn run bootstrap
in the
@superset-ui
monorepo root directory, which will install all dependencies for this package and
sym-link any @superset-ui
packages to your local system.
After that run yarn run storybook
which 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 (including any
@superset-ui/*
packages) viayarn add <package>
. -
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,
},
...
]
};