2017-06-06 17:19:12 -04:00
|
|
|
import React from "react";
|
2017-03-30 14:08:27 -04:00
|
|
|
|
2017-06-07 21:42:19 -07:00
|
|
|
export class Notice extends React.PureComponent {
|
2017-05-17 04:10:25 -04:00
|
|
|
static propTypes = {
|
2017-03-30 14:08:27 -04:00
|
|
|
isError: React.PropTypes.bool,
|
2017-06-06 17:19:12 -04:00
|
|
|
};
|
2017-05-17 04:10:25 -04:00
|
|
|
|
|
|
|
static defaultProps = {
|
|
|
|
isError: false,
|
2017-06-06 17:19:12 -04:00
|
|
|
};
|
2017-05-17 04:10:25 -04:00
|
|
|
|
|
|
|
render() {
|
2017-03-30 14:08:27 -04:00
|
|
|
return (
|
2017-06-06 17:19:12 -04:00
|
|
|
<section
|
|
|
|
className={
|
|
|
|
"notice " +
|
|
|
|
(this.props.isError ? "notice--error " : "") +
|
|
|
|
(this.props.className || "")
|
|
|
|
}
|
|
|
|
>
|
2017-03-30 14:08:27 -04:00
|
|
|
{this.props.children}
|
|
|
|
</section>
|
|
|
|
);
|
2017-05-17 04:10:25 -04:00
|
|
|
}
|
|
|
|
}
|
2017-03-30 14:08:27 -04:00
|
|
|
|
2017-06-05 21:21:55 -07:00
|
|
|
export default Notice;
|