Skip to content

Commit

Permalink
Update Storybook scripts and resolve TypeScript errors
Browse files Browse the repository at this point in the history
This commit updates the scripts in the Storybook package.json to use simpler calls and removes ts-expect-error comments in multiple Storybook stories, thereby acknowledging the resolution of TypeScript errors. The build command in Netlify is also adjusted. Further, it includes dependency library updates in the lock file.
  • Loading branch information
riccardoperra committed Nov 26, 2023
1 parent 6140d8c commit 3d29a9c
Show file tree
Hide file tree
Showing 6 changed files with 1,888 additions and 1,736 deletions.
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[build]
base = "/"
publish = "packages/storybook/storybook-static"
command = "pnpm --filter=@codeui/storybook-playground build-storybook"
command = "pnpm --filter=@codeui/storybook-playground build"
8 changes: 3 additions & 5 deletions packages/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"dev": "storybook dev -p 6006",
"build": "storybook build",
"preview": "vite preview",
"storybook:run": "storybook",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"storybook:run": "storybook"
},
"devDependencies": {
"@storybook/addon-a11y": "^7.5.3",
Expand Down
1 change: 1 addition & 0 deletions packages/storybook/src/stories/Listbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const ListboxOptionWithCustomItemLabel: Story = {
defaultValue: ["Item1"],
options: ["Item1", "Item2", "Item3"],
selectionMode: "multiple",
// @ts-ignore
itemLabel: (item: string) => <span style={{ color: "yellow" }}>Custom {item}</span>,
},
};
Expand Down
1 change: 1 addition & 0 deletions packages/storybook/src/stories/TextArea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const TextAreaOutlineVariant: Story = {
options: { autoResize: true },
placeholder: "Insert a value",
label: "Textarea label",
// @ts-expect-error Fix
theme: "outline",
description: "Lorem ipsum dolor sit amet",
},
Expand Down
8 changes: 8 additions & 0 deletions packages/storybook/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ export default defineConfig({
},
}),
],
ssr: {
noExternal: [
"@kobalte/core",
"@internationalized/message",
"@formatjs/**",
"@tanstack/solid-virtual",
],
},
});
Loading

0 comments on commit 3d29a9c

Please sign in to comment.