class NfgUi::Bootstrap::Components::ProgressBar
Bootstrap
Progress
Bar Component getbootstrap.com/docs/4.1/components/progress/
Public Instance Methods
component_family()
click to toggle source
# File lib/nfg_ui/bootstrap/components/progress_bar.rb, line 12 def component_family :progress end
render()
click to toggle source
# File lib/nfg_ui/bootstrap/components/progress_bar.rb, line 23 def render content_tag(:div, label, html_options) end
style()
click to toggle source
# File lib/nfg_ui/bootstrap/components/progress_bar.rb, line 16 def style [ options[:style], ("width: #{progress.to_i}%;" if progress) ].join(' ').squish end
Private Instance Methods
assistive_html_attributes()
click to toggle source
Calls superclass method
NfgUi::Bootstrap::Components::Base#assistive_html_attributes
# File lib/nfg_ui/bootstrap/components/progress_bar.rb, line 37 def assistive_html_attributes super.merge!(role: 'progressbar', aria: { valuenow: progress, valuemin: 0, valuemax: 100 }) end
css_classes()
click to toggle source
Calls superclass method
NfgUi::Bootstrap::Utilities::Themeable#css_classes
# File lib/nfg_ui/bootstrap/components/progress_bar.rb, line 29 def css_classes [ super, ("#{component_css_class}-striped" if striped), ("#{component_css_class}-animated" if animated) ].join(' ').squish end
outlineable?()
click to toggle source
# File lib/nfg_ui/bootstrap/components/progress_bar.rb, line 45 def outlineable? false end
theme_css_class_prefix()
click to toggle source
# File lib/nfg_ui/bootstrap/components/progress_bar.rb, line 41 def theme_css_class_prefix 'bg-' end