13 lines
274 B
TypeScript
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 '';
|
||
|
};
|