Sha256: 40dfe9cd11e65578359da9da440451467003f5cba85f65bcbf77a3d3bae3167c
Contents?: true
Size: 608 Bytes
Versions: 5
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true module Primer class FlexItemComponent < Primer::Component FLEX_AUTO_DEFAULT = false FLEX_AUTO_ALLOWED_VALUES = [FLEX_AUTO_DEFAULT, true] def initialize(flex_auto: FLEX_AUTO_DEFAULT, **system_arguments) @system_arguments = system_arguments @system_arguments[:classes] = class_names( @system_arguments[:classes], "flex-auto" => fetch_or_fallback(FLEX_AUTO_ALLOWED_VALUES, flex_auto, FLEX_AUTO_DEFAULT) ) end def call render(Primer::BoxComponent.new(**@system_arguments)) { content } end end end
Version data entries
5 entries across 5 versions & 1 rubygems