Sha256: b51fdec51f0519dd2cdba51c4ad9d1529c09e680f94a007ca8b90bfaa45cef40

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

module Yattho
  module Beta
    # @label ButtonGroup
    class ButtonGroupPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param size [Symbol] select [medium, small]
      def playground(size: :medium)
        render(Yattho::Beta::ButtonGroup.new(size: size)) do |component|
          component.with_button { "Button" }
          component.with_button(scheme: :primary) { "Primary" }
          component.with_button(scheme: :danger) { "Danger" }
          component.with_button(scheme: :outline) { "Outline" }
        end
      end

      # @label Default options
      #
      # @param size [Symbol] select [medium, small]
      def default(size: :medium)
        render(Yattho::Beta::ButtonGroup.new(size: size)) do |component|
          component.with_button { "Button" }
          component.with_button(scheme: :primary) { "Primary" }
          component.with_button(scheme: :danger) { "Danger" }
          component.with_button(scheme: :outline) { "Outline" }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yattho_view_components-0.1.1 previews/yattho/beta/button_group_preview.rb
yattho_view_components-0.0.1 previews/yattho/beta/button_group_preview.rb