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 closeButton property to toast options #17

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

tutkli
Copy link
Owner

@tutkli tutkli commented Apr 16, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Toaster close button behavior cannot be overridable by the toast function.

Closes #14

What is the new behavior?

Added new closeButton property in the toast options to override the toaster behavior.

// closeButton will override the toaster closeButton
toast('Hello World!',  { closeButton: true })

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@tutkli tutkli merged commit da3fdda into master Apr 16, 2024
2 checks passed
@tutkli tutkli deleted the feat/close-button branch April 16, 2024 11:16
tutkli pushed a commit that referenced this pull request Apr 16, 2024
## [1.0.0](v0.4.2...v1.0.0) (2024-04-16)

### ⚠ BREAKING CHANGES

* toast dissmisable field has been renamed to dismissible

### Features

* add closeButton property to toast options ([#17](#17)) ([da3fdda](da3fdda))

### Bug Fixes

* check toast dismissible value in toaster ([31bfc7b](31bfc7b))
* dismissable renamed to dismissible ([8e30c20](8e30c20))
* dismissable renamed to dismissible ([a162a3f](a162a3f))
* don't allow to swipe out a toast if it's not dismissible ([9502c43](9502c43))
* remove console log ([42a940b](42a940b))
@tutkli
Copy link
Owner Author

tutkli commented Apr 16, 2024

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Dismissable setting doesn't work both ways
1 participant