Sha256: f4ee27f18fe743809a63ac3da8dcaf0c67a13b741e14385d2e5ec4a2e08051ce
Contents?: true
Size: 1.75 KB
Versions: 105
Compression:
Stored size: 1.75 KB
Contents
# frozen_string_literal: true module Primer module Alpha # @label CheckBox class CheckBoxPreview < ViewComponent::Preview # @label Playground # # @param name text # @param value text # @param label text # @param caption text # @param visually_hide_label toggle # @param disabled toggle def playground( name: "my-check-box", value: "picard", label: "Jean-Luc Picard", caption: "Make it so", visually_hide_label: false, disabled: false ) system_arguments = { name: name, value: value, label: label, caption: caption, visually_hide_label: visually_hide_label, disabled: disabled } render(Primer::Alpha::CheckBox.new(**system_arguments)) end # @label Default def default render(Primer::Alpha::CheckBox.new(name: "my-check-box", label: "Jean-Luc Picard")) end # @!group Options # @snapshot # # @label With caption def with_caption render(Primer::Alpha::CheckBox.new(caption: "With a caption", name: "my-check-box1", label: "Jean-Luc Picard")) end # @label Checked def checked render(Primer::Alpha::CheckBox.new(checked: true, name: "my-check-box1", label: "Jean-Luc Picard")) end # @label Visually hidden label def visually_hide_label render(Primer::Alpha::CheckBox.new(visually_hide_label: true, name: "my-check-box2", label: "Jean-Luc Picard")) end # @label Disabled def disabled render(Primer::Alpha::CheckBox.new(disabled: true, name: "my-check-box4", label: "Jean-Luc Picard")) end # # @!endgroup end end end
Version data entries
105 entries across 105 versions & 2 rubygems