import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' export const AlertPropType = PropTypes.shape({ dismissable: PropTypes.bool, action: PropTypes.string.isRequired, message: PropTypes.string.isRequired }) export class Alert extends React.PureComponent { static propTypes = { alert: AlertPropType, dismiss: PropTypes.func.isRequired } dismiss = () => { const { alert, dismiss } = this.props dismiss(alert) } render () { const { alert } = this.props return (