1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-22 22:59:39 +02:00
Maybe/test/components/previews/toggle_component_preview.rb
Zach Gollwitzer ab6fdbbb68
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
Component namespacing (#2463)
* [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:23 EDT

* [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:30 EDT

* Update stimulus controller references to use namespace

* Fix remaining tests
2025-07-18 08:30:00 -04:00

15 lines
356 B
Ruby

class ToggleComponentPreview < ViewComponent::Preview
# @param disabled toggle
def default(disabled: false)
render(
DS::Toggle.new(
id: "toggle-component-id",
name: "toggle-component-name",
checked: false,
disabled: disabled,
checked_value: "on",
unchecked_value: "off"
)
)
end
end