Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

1.7 KB
Raw Blame

Storybook UI for OpenRemote components

For documenting and showcasing UI components, we use a tool called Storybook.
It can also be used as a workshop during development, or to test if components are working as expected.

When running locally, use npm run serve in this directory, and navigate to http://127.0.0.1:9000.
If deployed using Docker, you can access it at https://<your url>/storybook/.

Contributing

"Where are the documentation files?"

Standalone documentation like as "Getting Started" guides, can be found in the /docs directory.
It uses simple Markdown (MDX) similar to our Documentation repository.

Component documentation is located in the individual package directories.
So they can be found at /ui/component/<package>/stories/*.stories.ts.
We use the Component Story Format (CSF), which is very common across Storybook.
You can check their documentation for more information, or look at existing stories in our repository.

"How do I add a new component to the documentation?"

Create a <package>.stories.ts file in the /ui/component/<package>/stories directory.
You can use the Component Story Format (CSF), and it will automatically get picked up by Storybook.

If, alongside the playground, you'd like to add text documentation, add an MDX file to the /docs directory.
Components can use automatically generated documentation using <ComponentDocs story={} elementsjson={}>.


More documentation to come...