mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
28 lines
630 B
JavaScript
28 lines
630 B
JavaScript
/**
|
|
* @file
|
|
* @copyright 2020 Aleksej Komarov
|
|
* @license MIT
|
|
*/
|
|
|
|
import { classes, pureComponentHooks } from 'common/react';
|
|
import { Box } from './Box';
|
|
|
|
export const NoticeBox = (props) => {
|
|
const { className, color, info, warning, success, danger, ...rest } = props;
|
|
return (
|
|
<Box
|
|
className={classes([
|
|
'NoticeBox',
|
|
color && 'NoticeBox--color--' + color,
|
|
info && 'NoticeBox--type--info',
|
|
success && 'NoticeBox--type--success',
|
|
danger && 'NoticeBox--type--danger',
|
|
className,
|
|
])}
|
|
{...rest}
|
|
/>
|
|
);
|
|
};
|
|
|
|
NoticeBox.defaultHooks = pureComponentHooks;
|