https://github.com/atomicojs/storybook
https://github.com/atomicojs/storybook
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/atomicojs/storybook
- Owner: atomicojs
- Created: 2022-08-20T05:18:09.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-17T05:05:40.000Z (over 2 years ago)
- Last Synced: 2025-04-30T09:53:45.230Z (about 1 year ago)
- Language: TypeScript
- Size: 6.25 MB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @atomico/storybook
Allows projects to render projects with virtualDOM
## Setup
create .storybook/preview file and add the following script.
```js
import { decorator } from "@atomico/storybook";
export const decorators = [decorator];
```
## how to disable hmr? (Optional)
Create the file .storybook/disable-hmr.js and add the following script.
```js
if (module && module.hot && module.hot.decline) {
console.log(module);
module.hot.decline();
const hmr = new EventSource("__webpack_hmr");
hmr.addEventListener("message", function fullPageReload(event) {
try {
const { action } = JSON.parse(event.data);
if (action === "built") {
location.reload();
}
} catch (error) {}
});
}
```
## render compatibility
- [x] atomico
- [x] @atomico/lit-html
- [x] @atomico/uhtml