Skip to content

Commit

Permalink
hooks: move useToast to lib/hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
maany committed Oct 13, 2024
1 parent 9d3b9c9 commit bf14e21
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const config: StorybookConfig = {
{ find: /^@\/ui\/(.*)/, replacement: path.resolve(__dirname, "../lib/components/ui/$1") },
{ find: /^@\/assets\/(.*)/, replacement: path.resolve(__dirname, "../lib/assets/$1") },
{ find: /^@\/lib\/(.*)/, replacement: path.resolve(__dirname, "../lib/$1") },
{ find: /^@\/hooks\/(.*)/, replacement: path.resolve(__dirname, "../lib/hooks/$1") },
]
}
});
Expand Down
1 change: 1 addition & 0 deletions lib/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { useToast, toast } from "./use-toast";
File renamed without changes.
1 change: 1 addition & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "./tailwind/theme.css";
export * from "./components";
export * from "./hooks";
export * from "./tailwind";
export { NavigationMenuItem, NavigationMenuLink } from "@/ui/header";
export { ToastAction, ToastProvider } from "@/components/ui/toast";
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@/utils/*": ["./lib/utils/*"],
"@/assets/*": ["./lib/assets/*"],
"@/ui/*": ["./lib/components/ui/*"],
"@/hooks/*": ["./lib/hooks/*"],
}
},
"include": ["app", "lib", "tests", "stories"],
Expand Down
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export default defineConfig({
find: /^@\/lib\/(.*)/,
replacement: path.resolve(__dirname, "lib/$1"),
},
{
find: /^@\/hooks\/(.*)/,
replacement: path.resolve(__dirname, "lib/hooks/$1"),
},
],
},
test: {
Expand All @@ -57,6 +61,10 @@ export default defineConfig({
find: /^@\/lib\/(.*)/,
replacement: path.resolve(__dirname, "lib/$1"),
},
{
find: /^@\/hooks\/(.*)/,
replacement: path.resolve(__dirname, "lib/hooks/$1"),
},
],
clearMocks: true,
globals: true,
Expand Down

0 comments on commit bf14e21

Please sign in to comment.