Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Fix store notice classes (#4568)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brettshumaker committed Aug 12, 2021
1 parent a6c6c47 commit ec54e9b
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -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';
Expand All @@ -42,7 +42,6 @@ const StoreNoticesContainer = ( { className, notices, removeNotice } ) => {
{ ...props }
className={ classnames(
'wc-block-components-notices__notice',
'woocommerce-message',
getWooClassName( props )
) }
onRemove={ () => {
Expand Down

0 comments on commit ec54e9b

Please sign in to comment.