Sha256: 1ff8c160e644d21ebc8f65ebf8e40848df415c9bb9822287d181bd9b24039d62
Contents?: true
Size: 1.61 KB
Versions: 15
Compression:
Stored size: 1.61 KB
Contents
# frozen_string_literal: true module Primer module Alpha # @label CheckBox class CheckBoxPreview < ViewComponent::Preview # @label Playground # # @param name text # @param id text # @param value text # @param label text # @param caption text # @param visually_hide_label toggle # @param disabled toggle def playground( name: "my-check-box", id: nil, 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 # # @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 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
15 entries across 15 versions & 1 rubygems