Class: Ruflet::UI::Controls::RufletComponents::RowControl

Inherits:
Control
  • Object
show all
Defined in:
lib/ruflet_ui/ruflet/ui/controls/shared/row_control.rb

Constant Summary collapse

TYPE =
"row".freeze
WIRE =
"Row".freeze
KEYWORDS =
[:adaptive, :align, :alignment, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :auto_scroll, :badge, :bottom, :col, :controls, :data, :disabled, :expand, :expand_loose, :height, :intrinsic_height, :key, :left, :margin, :offset, :opacity, :right, :rotate, :rtl, :run_alignment, :run_spacing, :scale, :scroll, :scroll_interval, :size_change_interval, :spacing, :tight, :tooltip, :top, :vertical_alignment, :visible, :width, :wrap, :on_animation_end, :on_scroll, :on_size_change].freeze

Constants inherited from Control

Control::HOST_EXPANDED_TYPES, Control::SCHEMA_METADATA_CACHE

Instance Attribute Summary

Attributes inherited from Control

#children, #id, #props, #runtime_page, #type, #wire_id

Instance Method Summary collapse

Methods inherited from Control

#attach_handler, #emit, generate_id, #has_handler?, #merge_props, #on, #to_patch

Constructor Details

#initialize(id: nil, **props) ⇒ RowControl

Returns a new instance of RowControl.



13
14
15
16
17
18
19
20
# File 'lib/ruflet_ui/ruflet/ui/controls/shared/row_control.rb', line 13

def initialize(id: nil, **props)
  compact = {}
  props.each do |key, value|
    raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
    compact[key] = value unless value.nil?
  end
  super(type: TYPE, id: id, **compact)
end