import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import spring from 'react-motion/lib/spring'; import Icon from '../../../components/icon'; import StatusContent from '../../../components/status_content'; import { Stack } from '../../../components/ui'; import AccountContainer from '../../../containers/account_container'; import Motion from '../util/optional_motion'; const ActionsModal = ({ status, actions, onClick, onClose }) => { const renderAction = (action, i) => { if (action === null) { return
  • ; } const { icon = null, text, meta = null, active = false, href = '#', isLogout, destructive } = action; const Comp = href === '#' ? 'button' : 'a'; const compProps = href === '#' ? { onClick: onClick } : { href: href }; return (
  • {icon && }
    {text}
    {meta}
  • ); }; return ( {({ top }) => (
    {status && ( )}
    )}
    ); }; ActionsModal.propTypes = { status: ImmutablePropTypes.record, actions: PropTypes.array, onClick: PropTypes.func, onClose: PropTypes.func.isRequired, }; export default ActionsModal;