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:
Brett Shumaker 2021-08-12 08:43:35 -04:00 committed by GitHub
parent e0c3ae4704
commit 946e05d70b
1 changed files with 1 additions and 2 deletions

View File

@ -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={ () => {