ui: Inconsistency in docs for components (example Toast(er) )
Hello Shad
I was just experimenting with your library first time and was trying the Toaster component but I ran into confusing docs. Maybe you are still in the process re-documenting stuff?
Anyway, I came across this mismatch information:
Your docs says the import has to be like
import { Toaster } from "@/components/ui/toaster"
But the actual component is not toaster but toast and raising errors.
It’s nothing major as I just compare the actual file names with your docs but it catches one offguard if you don’t look close on the naming convention.
Is there anyway for me and others to help you spotting these changes and do a PR with the correct update for the docs? I tried searching for the docs in your repo but I think they are not in there?
Thanks!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
@cjonesuk yeah with the new version the toast’s docs is missing the additional files in the manual installation.
http://tinyurl.com/yn5pf84y i am getting this error when using toaser Error: (0 , components_ui_use_toast__WEBPACK_IMPORTED_MODULE_3_.useToast) is not a function
@feyiamujo1 Yeah, I opened an issue (#687) for that.
Hi @Tansi-Jones, there’s a mistake in the docs of the toast component.
To install the component simply run
npx shadcn-ui@latest add toast. After the installation is completed you can follow the rest of the guide, starting from theAdd the Toaster component.If you need the code for the manual installation just let me know.