Skip to content

Commit

Permalink
Add working react extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
charlescatta committed Jan 30, 2024
1 parent 9fb7bee commit 1ce45ba
Show file tree
Hide file tree
Showing 10 changed files with 7,686 additions and 802 deletions.
19 changes: 19 additions & 0 deletions zui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { StorybookConfig } from '@storybook/react-vite'

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
}
export default config
15 changes: 15 additions & 0 deletions zui/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}

export default preview
14 changes: 13 additions & 1 deletion zui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,23 @@
"test:watch": "vitest",
"type:check": "tsc --noEmit",
"format:check": "prettier --check src/",
"format:fix": "prettier --write src/"
"format:fix": "prettier --write src/",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.6.11",
"@storybook/addon-interactions": "^7.6.11",
"@storybook/addon-links": "^7.6.11",
"@storybook/addon-onboarding": "^1.0.11",
"@storybook/blocks": "^7.6.11",
"@storybook/react": "^7.6.11",
"@storybook/react-vite": "^7.6.11",
"@storybook/test": "^7.6.11",
"@types/react": "^18.2.48",
"prettier": "^2.8.8",
"react-dom": "^18.2.0",
"storybook": "^7.6.11",
"tsup": "^8.0.1",
"typescript": "^5.2.2",
"vitest": "^0.34.6",
Expand Down
Loading

0 comments on commit 1ce45ba

Please sign in to comment.