Sha256: 0aad4f9a226c36c2506872b6489bf0cfeb4699dd2964d9364995d6ef48900c82

Contents?: true

Size: 565 Bytes

Versions: 40

Compression:

Stored size: 565 Bytes

Contents

Rev.registerComponent 'ProgressBar',

  getDefaultProps: ->
    props =
      value: 0
      minValue: 0
      maxValue: 1

  getRatio: ->
    Math.min(1, (@props.value - @props.minValue) / (@props.maxValue - @props.minValue))

  getWidth: ->
    "#{@getRatio() * 100}%"

  render: ->
    className = @classAdd
      "RevProgressBar": true
      progress: true
      success: @props.success
      secondary: @props.secondary
      alert: @props.alert
    <div className={className}>
      <span className="RevMeter meter" style={{width: @getWidth()}} />
    </div>

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
revelry_core-0.1.11.6 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.11.5 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.11.2 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.11.1 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.11.0 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.7 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.6 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.5 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.4 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.3 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.2 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.1 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.10.0 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.9.2 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.9.1 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.9.0 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.8.6 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.8.5 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.8.4 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx
revelry_core-0.1.8.3 app/assets/javascripts/revelry/ui/visuals/ProgressBar.js.cjsx