Sha256: b6497418ed87a71c65ebf53f58aa75148982d3648654c37ce8f32a485c9a9782
Contents?: true
Size: 1.31 KB
Versions: 10
Compression:
Stored size: 1.31 KB
Contents
# frozen_string_literal: true module Primer module Alpha # @label Toggle Switch class ToggleSwitchPreview < ViewComponent::Preview include ActionView::Helpers::FormTagHelper def playground render(ToggleSwitch.new(src: "/toggle_switch")) end def default render(ToggleSwitch.new(src: "/toggle_switch")) end def checked render(ToggleSwitch.new(src: "/toggle_switch", checked: true)) end def disabled render(ToggleSwitch.new(src: "/toggle_switch", enabled: false)) end def checked_disabled render(ToggleSwitch.new(src: "/toggle_switch", checked: true, enabled: false)) end def small render(ToggleSwitch.new(src: "/toggle_switch", size: :small)) end def with_status_label_position_end render(ToggleSwitch.new(src: "/toggle_switch", status_label_position: :end)) end def with_a_bad_src render(ToggleSwitch.new(src: "/foo")) end def with_no_src render(ToggleSwitch.new) end def with_csrf_token render(ToggleSwitch.new(src: "/toggle_switch", csrf_token: "let_me_in")) end def with_bad_csrf_token render(ToggleSwitch.new(src: "/toggle_switch", csrf_token: "i_am_a_criminal")) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems