Sha256: 471298a30b1d46471cb9985038fbd5e24722c005a0e66b3115446e77bca16cf0

Contents?: true

Size: 1.12 KB

Versions: 45

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

# Setup Playground to use all available component props
# Setup Features to use individual component props and combinations

module Primer
  module OpenProject
    # @label BorderGrid
    class BorderGridPreview < ViewComponent::Preview

      # @label Playground
      # @param spacious [Boolean] toggle
      def playground(spacious: false)
        render(Primer::OpenProject::BorderGrid.new(spacious: spacious)) do |grid|
          grid.with_row { "Block 1" }
          grid.with_row { "Block 2" }
          grid.with_row { "Block 3" }
        end
      end

      # @label Default Options
      #
      # @snapshot
      def default
        render(Primer::OpenProject::BorderGrid.new) do |grid|
          grid.with_row { "Block 1" }
          grid.with_row { "Block 2" }
          grid.with_row { "Block 3" }
        end
      end

      # @label Spacious
      def spacious
        render(Primer::OpenProject::BorderGrid.new(spacious: true)) do |grid|
          grid.with_row { "Block 1" }
          grid.with_row { "Block 2" }
          grid.with_row { "Block 3" }
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
openproject-primer_view_components-0.49.1 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.49.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.48.2 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.48.1 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.48.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.47.1 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.47.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.46.1 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.46.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.45.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.44.3 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.44.2 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.44.1 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.44.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.43.1 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.43.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.42.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.41.1 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.41.0 previews/primer/open_project/border_grid_preview.rb
openproject-primer_view_components-0.40.0 previews/primer/open_project/border_grid_preview.rb