Sha256: 8410ef610509cea022026c15ccf7b0d775615697e5dc634c1c0575095d77d7ff

Contents?: true

Size: 1.46 KB

Versions: 7

Compression:

Stored size: 1.46 KB

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @label BorderBox
    class BorderBoxPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param padding [Symbol] select [default, condensed]
      def playground(padding: :default)
        render(Primer::Beta::BorderBox.new(padding: padding)) do |component|
          component.header { "Header" }
          component.body { "Body" }
          component.row { "Row one" }
          component.row { "Row two" }
          component.row { "Row three" }
          component.footer { "Footer" }
        end
      end

      # @label Default options
      #
      # @param padding [Symbol] select [default, condensed]
      def default(padding: :default)
        render(Primer::Beta::BorderBox.new(padding: padding)) do |component|
          component.header { "Header" }
          component.body { "Body" }
          component.row { "Row one" }
          component.row { "Row two" }
          component.row { "Row three" }
          component.footer { "Footer" }
        end
      end

      # @label Row schemes
      #
      # @param padding [Symbol] select [default, condensed]
      # @param scheme [Symbol] select [default, neutral, info, warning]
      def row_schemes(padding: :default, scheme: :default)
        render(Primer::Beta::BorderBox.new(padding: padding)) do |component|
          component.row(scheme: scheme) { "#{scheme.to_s.capitalize} scheme" }
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
primer_view_components-0.0.111 previews/primer/beta/border_box_preview.rb
primer_view_components-0.0.110 previews/primer/beta/border_box_preview.rb
primer_view_components-0.0.109 previews/primer/beta/border_box_preview.rb
primer_view_components-0.0.108 previews/primer/beta/border_box_preview.rb
primer_view_components-0.0.107 previews/primer/beta/border_box_preview.rb
primer_view_components-0.0.106 previews/primer/beta/border_box_preview.rb
primer_view_components-0.0.105 previews/primer/beta/border_box_preview.rb