class UiBibz::Ui::Core::Forms::Numbers::SliderHeader
Create a SliderHeader
This element is an extend of UiBibz::Ui::Core::Component
.
Attributes¶ ↑
-
content
- Content of element -
options
- Options of element -
html_options
- Html Options of element
Options¶ ↑
You can add HTML attributes using the html_options
. You can pass arguments in options attribute:
-
max
- [Float, Integer] -
min
- [Float, Integer] -
step
- [Float, Integer] -
in
- Array -
within
- Array
Signatures¶ ↑
UiBibz::Ui::Core::Forms::Numbers::SliderHeader.new(content, options = {}, html_options = {}).render UiBibz::Ui::Core::Forms::Numbers::SliderHeader.new(options = {}, html_options = {}) do content end.render
Examples¶ ↑
UiBibz::Ui::Core::Forms::Numbers::SliderHeader.new(nil, max: 20, min: 0)
Helper¶ ↑
ui_slider_header(content, options = {}, html_options = {})
Public Instance Methods
pre_render()
click to toggle source
Render html tag
# File lib/ui_bibz/ui/core/forms/numbers/slider_header.rb, line 44 def pre_render content_tag :div, html_options do concat header_min concat header_max end end
Private Instance Methods
component_html_classes()
click to toggle source
# File lib/ui_bibz/ui/core/forms/numbers/slider_header.rb, line 67 def component_html_classes 'slider-header' end
header_max()
click to toggle source
# File lib/ui_bibz/ui/core/forms/numbers/slider_header.rb, line 60 def header_max content_tag :div, class: 'slider-header-max' do concat content_tag :label, options[:label_max] || 'Max: ', for: options[:label_for_max] concat content_tag :span, options[:thumb_max], 'data-unit': options[:unit] || options[:unit_max] end end
header_min()
click to toggle source
# File lib/ui_bibz/ui/core/forms/numbers/slider_header.rb, line 53 def header_min content_tag :div, class: 'slider-header-min' do concat content_tag :label, options[:label_min] || 'Min: ', for: options[:label_for_min] concat content_tag :span, options[:thumb_min], 'data-unit': options[:unit] || options[:unit_min] end end