Skip to content
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

bug: title/description of toast hardly visible in darkmode #1121

Closed
DerTimonius opened this issue Aug 5, 2023 · 7 comments · Fixed by #1162
Closed

bug: title/description of toast hardly visible in darkmode #1121

DerTimonius opened this issue Aug 5, 2023 · 7 comments · Fixed by #1162

Comments

@DerTimonius
Copy link

Description

When using the default values after running npx shadcn-ui@latest init and npx shadcn-ui@latest add toast, the title and description of a toast are barely visible in darkmode:
image
Only after manually adding dark:text-slate-100 (in my case at least with the default values) to both ToastTitle and ToastDescription is it possible to read the toast:
image

Expected behavior

The text should be visible in darkmode without any additional changes

I'd be happy to help with a PR!

@SimeonAnunciado
Copy link

Good @DerTimonius day how is it going ? just want seek help the toast in mine are not working how did you install that properly?
i follow this unfortunately not work in my machine https://ui.shadcn.com/docs/components/toast
thanks

@1danii
Copy link
Contributor

1danii commented Aug 9, 2023

Works for me with default settings on [email protected] app dir, maybe an issue with your CSS or tw config?

@DerTimonius
Copy link
Author

@1danii did you use CSS variables? in the project where I encountered the issue I don't. I only followed the installation (for Astro in the case above) without making additional changes to the tw config

@SimeonAnunciado
Copy link

SimeonAnunciado commented Aug 9, 2023

@1danii do you have any reference for that installation ? unfortunately not work on me
i use also next version 13.4.12
here's the issue i landed when i put this components in my layout
Error: Toast must be used within ToastProvider next js

i follow both cli and manual way of installation but no luck
https://ui.shadcn.com/docs/components/toast

@DerTimonius
Copy link
Author

@SimeonAnunciado Did you add the <Toaster> component to your project? Or is it maybe a problem of relative imports?

@SimeonAnunciado
Copy link

what i did was i create a components i follow the docs and import it in my layout
image
then in my toast sample component i try to trigger that onclick
image

and did not appear any toast message

@1danii
Copy link
Contributor

1danii commented Aug 9, 2023

@DerTimonius Same issue when I start without CSS variables, looks like the text color class is missing on the component, hopefully fixed it on #1162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants