Class: Ruflet::UI::Controls::RufletComponents::ShadowControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/shared/shadow_control.rb
Constant Summary collapse
- TYPE =
"shadow".freeze
- WIRE =
"Shadow".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, color: nil, data: nil, elevation: nil, key: nil, path: nil, transparent_occluder: nil) ⇒ ShadowControl
constructor
A new instance of ShadowControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, color: nil, data: nil, elevation: nil, key: nil, path: nil, transparent_occluder: nil) ⇒ ShadowControl
Returns a new instance of ShadowControl.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ruflet_ui/ruflet/ui/controls/shared/shadow_control.rb', line 11 def initialize(id: nil, color: nil, data: nil, elevation: nil, key: nil, path: nil, transparent_occluder: nil) props = {} props[:color] = color unless color.nil? props[:data] = data unless data.nil? props[:elevation] = elevation unless elevation.nil? props[:key] = key unless key.nil? props[:path] = path unless path.nil? props[:transparent_occluder] = transparent_occluder unless transparent_occluder.nil? super(type: TYPE, id: id, **props) end |