Sha256: ad52ac8a6744e20b82c31a643b6c9b8cd089bf99d2aa2dece335942af301997f
Contents?: true
Size: 1.92 KB
Versions: 2
Compression:
Stored size: 1.92 KB
Contents
# frozen_string_literal: true module Yattho module Beta # @label State class StatePreview < ViewComponent::Preview # @label Playground # # @param title [String] # @param tag [Symbol] select [span, div] # @param size [Symbol] select [default, small] # @param scheme [Symbol] select [default, open, closed, merged] def playground(title: "State", scheme: :default, size: :default, tag: :span) render(Yattho::Beta::State.new(title: title, scheme: scheme, size: size, tag: tag)) { "State" } end # @label Default # # @param title [String] # @param tag [Symbol] select [span, div] # @param size [Symbol] select [default, small] # @param scheme [Symbol] select [default, open, closed, merged] def default(title: "State", scheme: :default, size: :default, tag: :span) render(Yattho::Beta::State.new(title: title, scheme: scheme, size: size, tag: tag)) { "State" } end # @!group States # # @label Default def states_default render(Yattho::Beta::State.new(title: "Default")) { "Default state" } end # @label Open def states_open render(Yattho::Beta::State.new(title: "Open", scheme: :open)) { "Open state" } end # @label Closed def states_closed render(Yattho::Beta::State.new(title: "Closed", scheme: :closed)) { "Closed state" } end # @label Merged def states_merged render(Yattho::Beta::State.new(title: "Merged", scheme: :merged)) { "Merged state" } end # # @!endgroup # @!group Sizes # # @label Default def sizes_default render(Yattho::Beta::State.new(title: "Default")) { "Default size" } end # @label Small def sizes_small render(Yattho::Beta::State.new(title: "Default", size: :small)) { "Small size" } end # # @!endgroup end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yattho_view_components-0.1.1 | previews/yattho/beta/state_preview.rb |
yattho_view_components-0.0.1 | previews/yattho/beta/state_preview.rb |