notification.tsx 702 B

12345678910111213141516171819202122232425
  1. import * as React from "react";
  2. interface IPlayheadProps {
  3. message: string;
  4. open: boolean;
  5. close: () => void
  6. }
  7. export class Notification extends React.Component<IPlayheadProps>{
  8. constructor(props: IPlayheadProps) {
  9. super(props);
  10. }
  11. render() {
  12. return (
  13. <div className="notification-area" style={{ display: this.props.open ? 'block' : 'none' }}>
  14. <div className="alert alert-error" >
  15. <button type="button" className="close" data-dismiss="alert" onClick={this.props.close}>&times;</button>
  16. {this.props.message}
  17. </div>
  18. </div>
  19. )
  20. }
  21. }