mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-26 22:26:05 +00:00
a9ab7afebf6e38bdb7654f255fa947ee92c863d0
#### Summary: This pull request addresses a documentation error found in the ShadCN website's Toast component example. Specifically, the import route for the hook is incorrect in the example. and fixes [#4816](https://github.com/shadcn-ui/ui/issues/4816) #### Issue: Upon reviewing the [ShadCN Toast documentation](https://ui.shadcn.com/docs/components/toast), I found that the import path for the Toast component hook was wrongly mentioned as being located in the `components` folder. According to the `component.json` file, the correct location of the hook is within the `hooks` folder inside the main directory. #### Fix: - Corrected the import path in the Toast component example from `components` to `hooks`, as per the `component.json` file structure. #### Example of Fix: **Before:** ```js import { useToast } from "@/components/use-toast"; ``` **After:** ```js import { useToast } from "@/hooks/use-toast"; ``` #### Testing: - Verified that the corrected path resolves correctly. - Ensured the example works as expected after the change. #### Impact: This fix prevents confusion for users following the example and ensures that the import path accurately reflects the project structure, improving the overall developer experience.
shadcn/ui
Accessible and customizable components that you can copy and paste into your apps. Free. Open Source. Use this to build your own component library.
Documentation
Visit http://ui.shadcn.com/docs to view the documentation.
Contributing
Please read the contributing guide.
License
Licensed under the MIT license.
Description
Languages
TypeScript
89.8%
MDX
6.8%
CSS
3.3%
