This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Store notices container always shows as an error #11768
Labels
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
focus: blocks
Specific work involving or impacting how blocks behave.
type: bug
The issue/PR concerns a confirmed bug.
type: good first issue
The issue is a good candidate for the first community contribution/for a newcomer to the team.
Describe the bug
If a notice with
status: success
is created, it still shows the red, error state.To reproduce
Steps to reproduce the behavior:
wp.data.dispatch('core/notices').createSuccessNotice( 'This is a success message, it should show in green!', { context: 'wc/cart' } )
Expected behavior
The notices should show the correct type.
Screenshots
Additional context
Removing this 'error' value and using the shorthand
status
instead will fix this - there is a TS error that should be fixed when doing that though.https://github.com/woocommerce/woocommerce-blocks/blob/trunk/packages/checkout/components/store-notices-container/store-notices.tsx#L130
The text was updated successfully, but these errors were encountered: