-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add shadcn/ui + Storybook #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4cf455e
Add shadcn/ui + Storybook
cte ed97c95
Revert this
cte 69a2e36
Remove CRA cruft
cte a5dac3f
Remove lucide
cte 9736795
Enable HMR for the webview, complements of vite
cte 4aff012
Merge pull request #667 from RooVetGit/cte/vite-hmr
mrubens 7282e02
Merge main
cte 901d769
Fix tests
cte 275dab0
Merge branch 'main' into cte/shadcn-ui-storybook
cte 5b6c6be
Update README
cte b534091
Fix boolean logic for cost, apiReqCancelReason (they are never null)
cte eefb721
Update to Vite 6 (HMR issue fixed by adding permissive CORS rules)
cte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,5 @@ | |
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| *storybook.log | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import type { StorybookConfig } from "@storybook/react-vite" | ||
|
|
||
| const config: StorybookConfig = { | ||
| stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
| addons: [ | ||
| "@storybook/addon-onboarding", | ||
| "@storybook/addon-essentials", | ||
| "@chromatic-com/storybook", | ||
| "@storybook/addon-interactions", | ||
| ], | ||
| framework: { | ||
| name: "@storybook/react-vite", | ||
| options: {}, | ||
| }, | ||
| } | ||
| export default config | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import type { Preview } from "@storybook/react" | ||
|
|
||
| import "../src/index.css" | ||
| import "./vscode.css" | ||
|
|
||
| const preview: Preview = { | ||
| parameters: { | ||
| controls: { | ||
| matchers: { | ||
| color: /(background|color)$/i, | ||
| date: /Date$/i, | ||
| }, | ||
| }, | ||
| }, | ||
| } | ||
|
|
||
| export default preview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /** | ||
| * Use `Developer: Generate Color Theme From Current Settings` to generate themes | ||
| * using your current VSCode settings. | ||
| * | ||
| * See: https://code.visualstudio.com/docs/getstarted/themes | ||
| */ | ||
|
|
||
| :root { | ||
| --vscode-editor-background: #1f1f1f; /* "editor.background" */ | ||
| --vscode-editor-foreground: #cccccc; /* "editor.foreground" */ | ||
| --vscode-menu-background: #1f1f1f; /* "menu.background" */ | ||
| --vscode-menu-foreground: #cccccc; /* "menu.foreground" */ | ||
| --vscode-button-background: #0078d4; /* "button.background" */ | ||
| --vscode-button-foreground: #ffffff; /* "button.foreground" */ | ||
| --vscode-button-secondaryBackground: #313131; /* "button.secondaryBackground" */ | ||
| --vscode-button-secondaryForeground: #cccccc; /* "button.secondaryForeground" */ | ||
| --vscode-disabledForeground: red; /* "disabledForeground" */ | ||
| --vscode-descriptionForeground: #9d9d9d; /* "descriptionForeground" */ | ||
| --vscode-focusBorder: #0078d4; /* "focusBorder" */ | ||
| --vscode-errorForeground: #f85149; /* "errorForeground" */ | ||
| --vscode-widget-border: #313131; /* "widget.border" */ | ||
| --vscode-input-background: #313131; /* "input.background" */ | ||
| --vscode-input-foreground: #cccccc; /* "input.foreground" */ | ||
| --vscode-input-border: #3c3c3c; /* "input.border" */ | ||
|
|
||
| /* I can't find these in the output of `Developer: Generate Color Theme From Current Settings` */ | ||
| --vscode-charts-red: red; | ||
| --vscode-charts-blue: blue; | ||
| --vscode-charts-yellow: yellow; | ||
| --vscode-charts-orange: orange; | ||
| --vscode-charts-green: green; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "$schema": "https://ui.shadcn.com/schema.json", | ||
| "style": "new-york", | ||
| "rsc": false, | ||
| "tsx": true, | ||
| "tailwind": { | ||
| "config": "tailwind.config.js", | ||
| "css": "src/index.css", | ||
| "baseColor": "neutral", | ||
| "cssVariables": true, | ||
| "prefix": "" | ||
| }, | ||
| "aliases": { | ||
| "components": "@/components", | ||
| "utils": "@/lib/utils", | ||
| "ui": "@/components/ui", | ||
| "lib": "@/lib", | ||
| "hooks": "@/hooks" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure which of these are actually needed; this was auto-generated by Storybook.