import PropTypes from 'prop-types'; import { PureComponent } from 'react'; import { FormattedMessage } from 'react-intl'; import UploadFileIcon from '@material-symbols/svg-600/outlined/upload_file.svg?react'; import spring from 'react-motion/lib/spring'; import { Icon } from 'mastodon/components/icon'; import Motion from '../../ui/util/optional_motion'; 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 }) =>
}
); } }