woocommerce/plugins/woocommerce-blocks/packages/checkout/components/store-notices-container/utils.ts

13 lines
274 B
TypeScript

export const getClassNameFromStatus = ( status = 'default' ): string => {
switch ( status ) {
case 'error':
return 'woocommerce-error';
case 'success':
return 'woocommerce-message';
case 'info':
case 'warning':
return 'woocommerce-info';
}
return '';
};