Allow disabling toggles, add toggle fieldset component
This commit is contained in:
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
|
||||
Reference in new issue
Block a user