question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Toast] Toast does not appear to have any styles

See original GitHub issue

Describe the bug When using useToast, none of the default styles are applied. In fact, there is no toast.ts file in the @chakra-ui/theme package at all.

Expected Behavior I should have the toast look like a toast on the website

Link to minimal reproduction https://codesandbox.io/s/funny-snyder-bm1r9?fontsize=14&hidenavigation=1&theme=dark

Steps to Reproduce: See reproduction above.

Suggested solution(s) Add some default styles

Desktop (please complete the following information):

  • OS: Mac OS 10.15.5
  • Browser: Chrome 83

Additional context Screen Shot 2020-06-29 at 12 09 31 PM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
segunadebayocommented, Jun 29, 2020
2reactions
segunadebayocommented, Jun 29, 2020

Hi @cereallarceny,

The useToast hook needs access to the theme in ChakraProvider. The way you set this up, useToast is above the provider that’s why you can’t see any styles.

To fix this, move the ChakraProvider and CSSReset to the index.js file.

PS: The reason there’s no toast.ts is that Toast re-uses the styles from the alert theme.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toast style is not working correctly · Issue #202 · fkhadra/react ...
In my project, I made a new file toast.css and pasted styles from this path: node_modules/react-toastify/dist/ReactToastify.css . And in my file ...
Read more >
Bootstrap toast does not show up - Stack Overflow
It mean you are accessing the jquery code before the file is loaded. Instead of placing jQuery code in the head section place...
Read more >
Toasts overview - Android Developers
A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message...
Read more >
Using React-Toastify to style your toast messages
To create promise toasts, add the following to your App. js file: const myPromise = new Promise((resolve) => fetch("https://jsonplaceholder. ...
Read more >
Toasts · Bootstrap v5.0
Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found