Sha256: 327b5a3b7c1de2dec208ebefca1e65dc644dd87fa3d721fba36cd60bf803cef6
Contents?: true
Size: 1.85 KB
Versions: 15
Compression:
Stored size: 1.85 KB
Contents
# frozen_string_literal: true module Primer module Alpha # @label MultiInput class MultiInputPreview < ViewComponent::Preview # @label Playground # # @param label text # @param caption text # @param disabled toggle def playground( label: "Dietary preference", caption: "What'll ya have?", disabled: false ) render_with_template( locals: { system_arguments: { label: label, caption: caption, disabled: disabled } } ) end # @label Default def default render_with_template( template: "primer/alpha/multi_input_preview/playground", locals: { system_arguments: { label: "Dietary preference" } } ) end # @label With caption def with_caption render_with_template( template: "primer/alpha/multi_input_preview/playground", locals: { system_arguments: { label: "Dietary preference", caption: "What'll ya have?" } } ) end # @label Visually hidden label def visually_hide_label render_with_template( template: "primer/alpha/multi_input_preview/playground", locals: { system_arguments: { label: "Dietary preference", visually_hide_label: true } } ) end # @label Disabled def disabled render_with_template( template: "primer/alpha/multi_input_preview/playground", locals: { system_arguments: { label: "Dietary preference", disabled: true } } ) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems