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

feat: add icons prop to <Toaster /> #270

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

amirhhashemi
Copy link
Contributor

@amirhhashemi amirhhashemi commented Dec 26, 2023

Closes #269

Added the icons prop to <Toaster /> which makes it possible to change the default icons.

With this change, the loadingIcon prop is not needed anymore and should be removed in the next major release. It's still supported for backward compatibility but I tagged it with @deprecated to guide the users to the icons prop.

I could've also added a prop for each toast type (successIcon, infoIcon, etc) to avoid a breaking change, but I think icons is more elegant. I can update the code if you prefer this approach.

Copy link

vercel bot commented Dec 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sonner ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2024 4:59pm

@emilkowalski
Copy link
Owner

Thank you!

@emilkowalski emilkowalski merged commit 2f66c2e into emilkowalski:main Jan 13, 2024
2 of 3 checks passed
@amirhhashemi amirhhashemi deleted the feat-icons-prop branch January 14, 2024 03:38
SHABIN-K added a commit to SHABIN-K/Brainwave that referenced this pull request Jan 30, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [sonner](https://sonner.emilkowal.ski/)
([source](https://togithub.com/emilkowalski/sonner)) | [`1.3.1` ->
`1.4.0`](https://renovatebot.com/diffs/npm/sonner/1.3.1/1.4.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/sonner/1.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/sonner/1.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/sonner/1.3.1/1.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/sonner/1.3.1/1.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>emilkowalski/sonner (sonner)</summary>

###
[`v1.4.0`](https://togithub.com/emilkowalski/sonner/releases/tag/v1.4.0)

[Compare
Source](https://togithub.com/emilkowalski/sonner/compare/c449e2741368b04b4524859aa2a60696c0cfb58c...v1.4.0)

#### What's Changed

- Use bunchee as bundler by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[emilkowalski/sonner#276
- build: bump bundler for perf purpose by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[emilkowalski/sonner#277
- Fix light theme on homepage by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[emilkowalski/sonner#281
- feat: `description` support function in promise by
[@&#8203;kahosan](https://togithub.com/kahosan) in
[emilkowalski/sonner#279
- add PR and issue templates by
[@&#8203;choeqq](https://togithub.com/choeqq) in
[emilkowalski/sonner#286
- refactor: remove unused remaining time ref by
[@&#8203;wobsoriano](https://togithub.com/wobsoriano) in
[emilkowalski/sonner#284
- types: change label types to ReactNode by
[@&#8203;CanRau](https://togithub.com/CanRau) in
[emilkowalski/sonner#280
- feat: add `icons` prop to `<Toaster />` by
[@&#8203;amirhhashemi](https://togithub.com/amirhhashemi) in
[emilkowalski/sonner#270
- Fix types of toaster icons by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[emilkowalski/sonner#294
- Fix loading icon bug by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[emilkowalski/sonner#295
- Add close button prop to toast by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[emilkowalski/sonner#296
- Swap bundlers by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[emilkowalski/sonner#297
- Dont dismiss loading toast by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[emilkowalski/sonner#298
- Upgrade bunchee for bundling bug fixes by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[emilkowalski/sonner#299
- bump packages by [@&#8203;choeqq](https://togithub.com/choeqq) in
[emilkowalski/sonner#283
- chore: remove unused npm lock file by
[@&#8203;huozhi](https://togithub.com/huozhi) in
[emilkowalski/sonner#300
- fix: make closeButton option in toast take precedence over Toaster by
[@&#8203;jzxhuang](https://togithub.com/jzxhuang) in
[emilkowalski/sonner#309
- Renaming too general className with project-specific one
([#&#8203;305](https://togithub.com/emilkowalski/sonner/issues/305)) by
[@&#8203;jschoder](https://togithub.com/jschoder) in
[emilkowalski/sonner#315
- ghost-div doesn't block click in Firefox by
[@&#8203;jschoder](https://togithub.com/jschoder) in
[emilkowalski/sonner#307
- Avoid issues with `<li>` offest when using different positions by
[@&#8203;mmalomo](https://togithub.com/mmalomo) in
[emilkowalski/sonner#314
- Implement option to pause when document is hidden by
[@&#8203;etcd](https://togithub.com/etcd) in
[emilkowalski/sonner#304
- Update bundler by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[emilkowalski/sonner#317

#### New Contributors

- [@&#8203;kahosan](https://togithub.com/kahosan) made their first
contribution in
[emilkowalski/sonner#279
- [@&#8203;choeqq](https://togithub.com/choeqq) made their first
contribution in
[emilkowalski/sonner#286
- [@&#8203;CanRau](https://togithub.com/CanRau) made their first
contribution in
[emilkowalski/sonner#280
- [@&#8203;amirhhashemi](https://togithub.com/amirhhashemi) made their
first contribution in
[emilkowalski/sonner#270
- [@&#8203;jzxhuang](https://togithub.com/jzxhuang) made their first
contribution in
[emilkowalski/sonner#309
- [@&#8203;jschoder](https://togithub.com/jschoder) made their first
contribution in
[emilkowalski/sonner#315
- [@&#8203;mmalomo](https://togithub.com/mmalomo) made their first
contribution in
[emilkowalski/sonner#314
- [@&#8203;etcd](https://togithub.com/etcd) made their first
contribution in
[emilkowalski/sonner#304

**Full Changelog**:
emilkowalski/sonner@v1.3.0...v1.4.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/SHABIN-K/toss).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
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 this pull request may close these issues.

FEATURE REQUEST: Provide a way to configure default icons
2 participants