Sha256: ae74c2a5246f6e562dad0aa1630885e7490cb667dcefece63eb907e9b4d2a3fc
Contents?: true
Size: 1.08 KB
Versions: 32
Compression:
Stored size: 1.08 KB
Contents
# frozen_string_literal: true module Primer module OpenProject # A set of blocks that are shown below each other with separator lines in between class BorderGrid < Primer::Component status :open_project # Use to render a block inside the grid # # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> renders_many :rows, lambda { |**system_arguments, &block| Primer::OpenProject::BorderGrid::Cell.new(**system_arguments, &block) } # @param spacious [Boolean] Whether to add margin to the bottom of the component. # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> def initialize(spacious: false, **system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = "div" @spacious = spacious @system_arguments[:classes] = class_names( @system_arguments[:classes], "BorderGrid", "BorderGrid--spacious" => @spacious ) end def render? rows.any? end end end end
Version data entries
32 entries across 32 versions & 1 rubygems