Skip to content

Commit

Permalink
use storybook with vite for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
hfxbse committed Jun 26, 2024
1 parent 7f87c05 commit d6f0314
Show file tree
Hide file tree
Showing 11 changed files with 19,817 additions and 152 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
/node_modules
/umd
npm-debug.log*
/.idea
/dist
*storybook.log
/storybook-static
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ src
demo
.gitattributes
/.idea
*storybook.log
/storybook-static
18 changes: 18 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
stories: [
"../src/*.mdx",
"../src/**/*.mdx",
"../src/*.stories.@(js|jsx|mjs|ts|tsx)",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
addons: [
"@storybook/addon-essentials",
"@storybook/blocks",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
};
export default config;
13 changes: 13 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

## Development Server

- `npm start` will run the app's demo folder at [http://localhost:3000](http://localhost:3000) with hot module reloading.
- `npm start` will run the app's [Storybook](https://storybook.js.org/) at [http://localhost:3000](http://localhost:3000) with hot module
reloading.

## Building

Expand Down
38 changes: 0 additions & 38 deletions demo/src/index.js

This file was deleted.

Loading

0 comments on commit d6f0314

Please sign in to comment.