Class: Spark::Input::Switch
Constant Summary
collapse
- SIZE =
i[small medium].freeze
- ALIGNMENT =
i[left right].freeze
Instance Method Summary
collapse
#selector, #to_s, #unique_id
Constructor Details
#initialize ⇒ Switch
12
13
14
15
16
17
|
# File 'app/components/spark/input/switch.rb', line 12
def initialize(*)
super
switch_class.add("size-#{@size}")
switch_class.add("align-#{@align}") if @align
end
|
Instance Method Details
#switch_class ⇒ Object
19
20
21
|
# File 'app/components/spark/input/switch.rb', line 19
def switch_class
@switch_class ||= Classname.new(base: "spark-input-switch")
end
|