mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 21:57:55 +08:00
22 lines
615 B
Text
22 lines
615 B
Text
|
React = require 'react'
|
||
|
_ = require 'underscore'
|
||
|
|
||
|
class SendingProgressBar extends React.Component
|
||
|
@propTypes:
|
||
|
progress: React.PropTypes.number.isRequired
|
||
|
|
||
|
render: ->
|
||
|
otherProps = _.omit(@props, _.keys(@constructor.propTypes))
|
||
|
if 0 < @props.progress < 99
|
||
|
<div className="sending-progress" {...otherProps}>
|
||
|
<div className="filled"
|
||
|
style={width:"#{Math.min(100, @props.progress)}%"}>
|
||
|
</div>
|
||
|
</div>
|
||
|
else
|
||
|
<div className="sending-progress" {...otherProps}>
|
||
|
<div className="indeterminate"></div>
|
||
|
</div>
|
||
|
|
||
|
module.exports = SendingProgressBar
|