Class: Ruflet::UI::Controls::RufletComponents::AlertDialogControl

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

Constant Summary collapse

TYPE =
"alertdialog".freeze
WIRE =
"AlertDialog".freeze
KEYWORDS =
[:action_button_padding, :actions, :actions_alignment, :actions_overflow_button_spacing, :actions_padding, :adaptive, :alignment, :badge, :barrier_color, :bgcolor, :clip_behavior, :col, :content, :content_padding, :content_text_style, :data, :disabled, :elevation, :expand, :expand_loose, :icon, :icon_color, :icon_padding, :inset_padding, :key, :modal, :opacity, :open, :rtl, :scrollable, :semantics_label, :shadow_color, :shape, :title, :title_padding, :title_text_style, :tooltip, :visible, :on_dismiss].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) ⇒ AlertDialogControl

Returns a new instance of AlertDialogControl.



13
14
15
16
17
18
19
20
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/alertdialog_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