Allow disabling toggles, add toggle fieldset component

This commit is contained in:
Râu Cao authored and Gitea committed 2023-03-15 09:03:39 +00:00
1 parent 805733939c
commit e758e258a8
5 files changed
+41 -20

No files matched your search

@@ -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