Class: Ruflet::UI::Controls::RufletComponents::BadgeControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/badge_control.rb
Constant Summary collapse
- TYPE =
"badge".freeze
- WIRE =
"Badge".freeze
Constants inherited from Control
Instance Attribute Summary
Attributes inherited from Control
#children, #id, #props, #runtime_page, #type, #wire_id
Instance Method Summary collapse
-
#initialize(id: nil, alignment: nil, bgcolor: nil, data: nil, key: nil, label: nil, label_visible: nil, large_size: nil, offset: nil, padding: nil, small_size: nil, text_color: nil, text_style: nil) ⇒ BadgeControl
constructor
A new instance of BadgeControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, alignment: nil, bgcolor: nil, data: nil, key: nil, label: nil, label_visible: nil, large_size: nil, offset: nil, padding: nil, small_size: nil, text_color: nil, text_style: nil) ⇒ BadgeControl
Returns a new instance of BadgeControl.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/badge_control.rb', line 11 def initialize(id: nil, alignment: nil, bgcolor: nil, data: nil, key: nil, label: nil, label_visible: nil, large_size: nil, offset: nil, padding: nil, small_size: nil, text_color: nil, text_style: nil) props = {} props[:alignment] = alignment unless alignment.nil? props[:bgcolor] = bgcolor unless bgcolor.nil? props[:data] = data unless data.nil? props[:key] = key unless key.nil? props[:label] = label unless label.nil? props[:label_visible] = label_visible unless label_visible.nil? props[:large_size] = large_size unless large_size.nil? props[:offset] = offset unless offset.nil? props[:padding] = padding unless padding.nil? props[:small_size] = small_size unless small_size.nil? props[:text_color] = text_color unless text_color.nil? props[:text_style] = text_style unless text_style.nil? super(type: TYPE, id: id, **props) end |