]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/features/compose/components/upload_progress.js
dae6bf259a849edf883dd3dc7e6fa09bdd062fe7
1 import React
from 'react';
2 import PropTypes
from 'prop-types';
3 import Motion
from 'react-motion/lib/Motion';
4 import spring
from 'react-motion/lib/spring';
5 import { FormattedMessage
} from 'react-intl';
7 class UploadProgress
extends React
.PureComponent
{
10 active: PropTypes
.bool
,
11 progress: PropTypes
.number
15 const { active
, progress
} = this.props
;
22 <div className
='upload-progress'>
23 <div className
='upload-progress__icon'>
24 <i className
='fa fa-upload' />
27 <div className
='upload-progress__message'>
28 <FormattedMessage id
='upload_progress.label' defaultMessage
='Uploading...' />
30 <div className
='upload-progress__backdrop'>
31 <Motion defaultStyle
={{ width: 0 }} style
={{ width: spring(progress
) }}>
33 <div className
='upload-progress__tracker' style
={{ width: `${width}%` }} />
44 export default UploadProgress
;
This page took 0.07248 seconds and 2 git commands to generate.