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