import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage, injectIntl } from 'react-intl'; import spring from 'react-motion/lib/spring'; import StatusContent from '../../../components/status_content'; import Avatar from '../../../components/avatar'; import RelativeTimestamp from '../../../components/relative_timestamp'; import DisplayName from '../../../components/display_name'; import Icon from '../../../components/icon'; import Button from '../../../components/button'; import Motion from '../util/optional_motion'; import classNames from 'classnames'; export default @injectIntl class ActionsModal extends ImmutablePureComponent { static propTypes = { status: ImmutablePropTypes.map, actions: PropTypes.array, onClick: PropTypes.func, onClose: PropTypes.func.isRequired, }; renderAction = (action, i) => { if (action === null) { return
  • ; } const { icon = null, text, meta = null, active = false, href = '#', isLogout, destructive } = action; return (
  • {icon && }
    {text}
    {meta}
  • ); } render() { const { onClose } = this.props; const status = this.props.status && (
    ); return ( {({ top }) => (
    {status}
    )}
    ); } }