Skip to content

Commit

Permalink
feat: set up panda-css with Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
lebmouse committed Jul 24, 2024
1 parent 2011565 commit fde43cb
Show file tree
Hide file tree
Showing 10 changed files with 1,943 additions and 183 deletions.
1 change: 1 addition & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '../src/global.css';
import '../src/index.css';
import './styles.css';

/** @type { import('@storybook/react').Preview } */
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"sideEffects": false,
"repository": "https://github.com/corca-ai/cds",
"scripts": {
"build": "tsc --noEmit && vite build",
"build": "tsc --noEmit && vite build && panda cssgen --outfile dist/index.css",
"typecheck": "tsc --noEmit",
"lint": "eslint ./src",
"storybook": "storybook dev -p 6006",
Expand All @@ -53,6 +53,7 @@
},
"dependencies": {
"date-fns": "3.3.1",
"react-aria-components": "^1.3.1",
"react-colorful": "5.6.1",
"react-datepicker": "4.25.0",
"react-hot-toast": "2.4.1"
Expand Down
13 changes: 7 additions & 6 deletions panda.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ const cdsPreset = definePreset({
etc: {
white: { value: '#ffffff' },
focus: { value: '#3b79d7' },
active: {
30: { value: '#b10e1c' },
20: { value: '#fc685f' },
error: {
10: { value: '#ffe7e6' },
20: { value: '#fc685f' },
30: { value: '#b10e1c' },
},
error: {
30: { value: '#037847' },
20: { value: '#14ba6d' },
active: {
10: { value: '#ecfdf3' },
20: { value: '#14ba6d' },
30: { value: '#037847' },
},
},
},
Expand Down Expand Up @@ -124,4 +124,5 @@ export default defineConfig({
polyfill: true,
// The output directory for your css system
outdir: 'styled-system',
jsxFramework: 'react',
});
Loading

0 comments on commit fde43cb

Please sign in to comment.