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

Option for disabling auto styling #177

Closed
baumerdev opened this issue Oct 10, 2023 · 1 comment
Closed

Option for disabling auto styling #177

baumerdev opened this issue Oct 10, 2023 · 1 comment

Comments

@baumerdev
Copy link

There are some some closed issues regarding custom styling/theming, e.g. #143 or #171

The problem is, if you add classes via className those will be added to the toast but the default styles usually overwrite those styles since the are more specific. So you have to always use important for every property that's included in the default styles.

The default styling is only disabled if you provide a "jsx" via custom()method. But with that you aren't able to use Promises since they exclude each other.

I propose to introduce a new config variable like unstyled?: boolean. If set to true the data-styled on the <li> value won't be set to true.
https://github.com/emilkowalski/sonner/blob/main/src/index.tsx#L214C7-L214C40

@emilkowalski
Copy link
Owner

Added in #187

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

No branches or pull requests

2 participants