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

Allow per notification duration #371

Merged
merged 3 commits into from
Mar 5, 2023

Conversation

SamuelNitsche
Copy link
Contributor

Allow per notification duration

This PR allows custom durations per notification.

Description

You can configure the duration like this:

toast()
  ->info('Bar', 'Foo')
  ->duration(1000)
  ->push();

Without the duration method, the default duration set in the config will be used.

You can even keep a notification forever using the following code:

toast()
  ->info('Bar', 'Foo')
  ->keep()
  ->push();

Related Issue

#23

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@SamuelNitsche SamuelNitsche marked this pull request as ready for review March 5, 2023 13:02
@usernotnull
Copy link
Owner

@SamuelNitsche thanks for your clean pull request, much appreciated 💪🏼

Everything looks in order, I'll just do a quick test and push a new release.

@usernotnull usernotnull linked an issue Mar 5, 2023 that may be closed by this pull request
@usernotnull usernotnull self-assigned this Mar 5, 2023
@usernotnull usernotnull added the enhancement New feature or request label Mar 5, 2023
@usernotnull usernotnull merged commit ba087f3 into usernotnull:main Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Per notification duration
2 participants