import React from "react"; import { observer } from "mobx-react"; import classNames from "classnames"; export const Alert = observer( class Alert extends React.Component< { children?: React.ReactNode; onDismiss?: () => void; className?: string; }, {} > { render() { let className = classNames("alert", this.props.className); return (
{this.props.onDismiss && ( )} {this.props.children}
); } } ); export const AlertDanger = observer( class AlertDanger extends React.Component< { children?: React.ReactNode; onDismiss?: () => void; className?: string; }, {} > { render() { let className = classNames("alert-danger", this.props.className); return ( {this.props.children} ); } } );