[Feature] SYST-583: Add our own Toast component#411
Merged
Conversation
…dd-our-own-toast-component
|
Coneto Storybook preview deployed to: https://dev.files.systatum.com/coneto/ff152a2c |
This reverts commit c453a43.
|
Coneto Storybook preview deployed to: https://dev.files.systatum.com/coneto/ff152a2c |
adamnoto
requested changes
Jun 3, 2026
| store.root.render(<ToastBridge position={_position} />); | ||
| } | ||
|
|
||
| const positionCss = (pos: ToastPosition) => { |
Contributor
There was a problem hiding this comment.
this doesn't need to be a function right? we can just simply declare TOAST_POSITION_STYLE Record and call it immediately, so no need a function call
| let _uid = 0; | ||
| const timers = new Map<string, ReturnType<typeof setTimeout>>(); | ||
|
|
||
| function scheduleRemove(id: string, position: ToastPosition, delay: number) { |
|
Coneto Storybook preview deployed to: https://dev.files.systatum.com/coneto/ff152a2c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This pull request introduces a
Toastcomponent, allowing users to display notifications without relying on a third-party library. It provides a built-in, theme-aware solution with a simple and consistent API.API
Behavior
primary,success,warning,danger, andneutral.variantisneutralor unsupported, do not render a default icon.iconis provided, it takes precedence over the variant icon.Toast.primary()Toast.success()Toast.warning()Toast.danger()Toast.neutral()detailSlotis provided, render a Show more toggle that expands/collapses the content and updates the chevron accordingly.closableis enabled:Icon Positions
Support:
left-center(default)left-topright-centerright-topcenter-centerStories
LoadingSpinnerandcenter-centericon positionSource:
[Feature] SYST-583: Add our own
ToastcomponentTick what you have done:
[x] I have double checked the functionality with the ticket in linear, or any other relevant discussion avenue
[x] I have created/updated any relevant test code
[x] I have tested it myself