import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import spring from 'react-motion/lib/spring'; import UploadFileIcon from '@/material-icons/400-24px/upload_file.svg?react'; import { Icon } from 'mastodon/components/icon'; import Motion from '../../ui/util/optional_motion'; export const UploadProgress = ({ active, progress, isProcessing }) => { if (!active) { return null; } let message; if (isProcessing) { message = ; } else { message = ; } return (
{message}
{({ width }) =>
}
); }; UploadProgress.propTypes = { active: PropTypes.bool, progress: PropTypes.number, isProcessing: PropTypes.bool, };