Class: Bootstrap4RailsComponents::Bootstrap::Components::Progress
- Includes:
- Utilities::Progressable
- Defined in:
- lib/bootstrap4_rails_components/bootstrap/components/progress.rb
Overview
Bootstrap Parent Progress Component getbootstrap.com/docs/4.1/components/progress/
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
#body, #options, #view_context
Instance Method Summary collapse
Methods included from Utilities::Progressable
#animated, #label, #progress, #striped, #theme
Methods inherited from Base
#component_initialize, #data, #href, #html_options, #id, #initialize, #utility_initialize
Constructor Details
This class inherits a constructor from Bootstrap4RailsComponents::Bootstrap::Components::Base
Instance Method Details
#component_family ⇒ Object
11 12 13 |
# File 'lib/bootstrap4_rails_components/bootstrap/components/progress.rb', line 11 def component_family :progress end |
#height ⇒ Object
15 16 17 |
# File 'lib/bootstrap4_rails_components/bootstrap/components/progress.rb', line 15 def height .fetch(:height, nil) end |
#render ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/bootstrap4_rails_components/bootstrap/components/progress.rb', line 26 def render super do if body (block_given? ? yield : body) else Bootstrap4RailsComponents::Bootstrap::Components::ProgressBar.new({ theme: theme, label: label, progress: progress, striped: striped, animated: animated }, view_context).render end end end |
#style ⇒ Object
19 20 21 22 23 24 |
# File 'lib/bootstrap4_rails_components/bootstrap/components/progress.rb', line 19 def style [ super, ("height: #{height}px;" if height) ].join(' ').squish end |