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

fix: toaster types #1616

Conversation

filippofilip95
Copy link
Contributor

@filippofilip95 filippofilip95 commented Feb 9, 2023

Hello ! :)

Overview
This PR fixes the Typescript type of the toaster instance in the following way:

  1. Retype title argument in toaster. The title was typed as only a string but instead, it can support ReactNode. Type ReactNode is for title also specified in interface Toast.
  2. Add function remove to the toaster. Function remove is exposed in the toaster however it doesn't exist in types. Function remove is also already used in the storybook here.

Screenshots (if applicable)
Documentation doesn't need a change since it's already considering that type title is a node.

Screenshot 2023-02-09 at 10 40 03

Documentation

  • Updated Typescript types and/or component PropTypes
  • Added / modified component docs
  • Added / modified Storybook stories

@netlify
Copy link

netlify bot commented Feb 9, 2023

Deploy Preview for evergreen-storybook ready!

Name Link
🔨 Latest commit 9048925
🔍 Latest deploy log https://app.netlify.com/sites/evergreen-storybook/deploys/63ecc4b27153890008c37a70
😎 Deploy Preview https://deploy-preview-1616--evergreen-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@filippofilip95 filippofilip95 changed the title Use ReactNode for title argument of toaster Fix toaster types Feb 15, 2023
@filippofilip95 filippofilip95 changed the title Fix toaster types Fix toaster types Feb 15, 2023
@filippofilip95 filippofilip95 changed the title Fix toaster types fix: toaster types Feb 15, 2023
@brandongregoryscott
Copy link
Contributor

brandongregoryscott commented Feb 15, 2023

Thanks for the contribution, @filippofilip95! This should be fixed in https://github.com/segmentio/evergreen/releases/tag/v7.1.4

@brandongregoryscott brandongregoryscott merged commit fbaa365 into segmentio:master Feb 15, 2023
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.

2 participants