import { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import { Icon } from 'mastodon/components/icon'; import { FormattedMessage } from 'react-intl'; export default class UploadProgress extends PureComponent { static propTypes = { active: PropTypes.bool, progress: PropTypes.number, isProcessing: PropTypes.bool, }; render () { const { active, progress, isProcessing } = this.props; if (!active) { return null; } let message; if (isProcessing) { message = ; } else { message = ; } return (
{message}
{({ width }) =>
}
); } }