mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
18 lines
329 B
JavaScript
18 lines
329 B
JavaScript
|
import classNames from 'classnames';
|
||
|
|
||
|
const Notice = ( { children, type = 'info', className = '' } ) => {
|
||
|
if ( ! children ) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
const elementClasses = classNames(
|
||
|
'ppcp--notice',
|
||
|
`type--${ type }`,
|
||
|
className
|
||
|
);
|
||
|
|
||
|
return <span className={ elementClasses }>{ children }</span>;
|
||
|
};
|
||
|
|
||
|
export default Notice;
|