-
Notifications
You must be signed in to change notification settings - Fork 613
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(admin-ui): Toast component #4249
base: feat/new-admin-ui
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left two comments. All in all, looks good.
</App> | ||
</WcpProvider> | ||
</UiProviders> | ||
{/*<UiProviders>*/} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to stay commented out?
export const WithDescription: Story = { | ||
args: { | ||
...Default.args, | ||
description: <ToastDescription text={'Entry "Article One" has been successfully created'} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed this here, and thinking we should do the same approach I have here.
So, in this case, we'd end up prolly with Toast.Description
. Wdyt?
BTW not sure if applicable here, but I did this withStaticProps
helper within the Avatar PR, just to make it a bit more humane when sticking extra components as static properties on an existing React component / class.
This PR adds the
Toast
component to the@webiny/admin-ui
package.We are exporting a props-based flat component based on the following radix component.
The new component is fully compatible with the old
Snackbar
component, but some refactoring is needed when UI tokens are defined.The
useSnackbar
hook is fully compatible with the new Toast component. Refactoring the hook will be necessary; a separate PR will address it.