Allow disabling toggles, add toggle fieldset component
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
|
||||
module FormElements
|
||||
class ToggleComponent < ViewComponent::Base
|
||||
def initialize(enabled:)
|
||||
def initialize(enabled:, input_enabled: true)
|
||||
@enabled = !!enabled
|
||||
@input_enabled = input_enabled
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user