Sha256: 86f25d551468ff4169777dcf0dff0d2ce07c6ebf0fff24edd647470a1b377a27
Contents?: true
Size: 1.06 KB
Versions: 38
Compression:
Stored size: 1.06 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| Primer::OpenProject::BorderGrid::Cell.new(**system_arguments) } # @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
38 entries across 38 versions & 1 rubygems