Sha256: 5de79d240c2fd468bad99ae4288ea3e96bcc036ff1cf8e27925a80279b9707bd
Contents?: true
Size: 1.27 KB
Versions: 13
Compression:
Stored size: 1.27 KB
Contents
# typed: false # frozen_string_literal: true module Ariadne module UI module Card module Header class Component < Ariadne::BaseComponent option :prioritize, default: proc { :title } option :size, default: proc { :base } renders_one :title, lambda { |type: :subheading, **options| options[:type] ||= type Ariadne::UI::Typography::Component.new(**options) } renders_one :description, lambda { |type: :muted, size: :sm, **options| options[:type] ||= type options[:size] ||= size Ariadne::UI::Typography::Component.new(**options) } accepts_html_attributes do |html_attrs| html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style, html_attrs[:class]].join(" ")) end style do base do [ "ariadne-flex", "ariadne-flex-col", "ariadne-space-y-1.5", "ariadne-p-6", ] end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems