Fix store notice classes (https://github.com/woocommerce/woocommerce-blocks/pull/4568)
The `StoreNoticesContainer` component is using an incorrect class name for a "success" notice and also applying the general `woocommerce-message` (what's used by WC core for the "success" notice) to all notices. In some instances, this could cause the general `woocommerce-message` styles to be applied instead of the `woocommerce-error` or `woocommerce-info` styles. This PR changes the use of `woocommerce-success` to `woocommerce-message` and prevents `woocommerce-message` from being applied to all notices.
This commit is contained in:
parent
e0c3ae4704
commit
946e05d70b
|
@ -15,7 +15,7 @@ const getWooClassName = ( { status = 'default' } ) => {
|
|||
case 'error':
|
||||
return 'woocommerce-error';
|
||||
case 'success':
|
||||
return 'woocommerce-success';
|
||||
return 'woocommerce-message';
|
||||
case 'info':
|
||||
case 'warning':
|
||||
return 'woocommerce-info';
|
||||
|
@ -42,7 +42,6 @@ const StoreNoticesContainer = ( { className, notices, removeNotice } ) => {
|
|||
{ ...props }
|
||||
className={ classnames(
|
||||
'wc-block-components-notices__notice',
|
||||
'woocommerce-message',
|
||||
getWooClassName( props )
|
||||
) }
|
||||
onRemove={ () => {
|
||||
|
|
Loading…
Reference in New Issue