Sha256: b129dbfd26c4addf2a576b1fefe834a3cf192fedc10961c934a6a338f5e03b27
Contents?: true
Size: 548 Bytes
Versions: 10
Compression:
Stored size: 548 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, **kwargs) @kwargs = kwargs @kwargs[:classes] = class_names( @kwargs[:classes], "flex-auto" => fetch_or_fallback(FLEX_AUTO_ALLOWED_VALUES, flex_auto, FLEX_AUTO_DEFAULT) ) end def call render(Primer::BoxComponent.new(**@kwargs)) { content } end end end
Version data entries
10 entries across 10 versions & 1 rubygems