superset/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo
dependabot-preview[bot] 1fd72d53e0 build(deps): bump gh-pages from 2.2.0 to 3.0.0 (#565)
Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/tschaub/gh-pages/releases)
- [Changelog](https://github.com/tschaub/gh-pages/blob/master/changelog.md)
- [Commits](https://github.com/tschaub/gh-pages/compare/v2.2.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-11-26 11:46:23 +08:00
..
.storybook feat(demo): add helpers for resizable chart demo (#557) 2021-11-26 11:46:22 +08:00
storybook feat(plugin-chart-choropleth-map): add package (#560) 2021-11-26 11:46:23 +08:00
package.json build(deps): bump gh-pages from 2.2.0 to 3.0.0 (#565) 2021-11-26 11:46:23 +08:00
README.md Revert "build: try to merge superset-ui-plugins" 2021-11-26 11:45:03 +08:00
tsconfig.json feat: allow toggling of table viz's bar chart backgrounds (#352) 2021-11-26 11:45:06 +08:00

@superset-ui/demo

Version David (path)

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:

  1. Add any new package dependencies (including any @superset-ui/* packages) via yarn add <package>.

  2. Create a new folder that mirrors the package name

    e.g., mkdir storybook/stories/superset-ui-color/

  3. Add an index.js file to that folder with a default export with the following shape:

you can use the | separator within the storyPath 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,
     },
     ...
   ]
 };