Sha256: 99c09b6614bad5f16924b388cd4225da50e5ca89ebf5b02de21190210795ecdd
Contents?: true
Size: 1.33 KB
Versions: 6
Compression:
Stored size: 1.33 KB
Contents
# typed: false # frozen_string_literal: true module Ariadne module UI module Card class Component < Ariadne::BaseComponent option :href, default: -> { nil } renders_one :header, Ariadne::UI::Card::Header::Component accepts_html_attributes do |html_attrs| html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(link: href.present? ? :yes : :no), html_attrs[:class]].join(" ")) end renders_one :footer, Ariadne::UI::Card::Footer::Component style do base do [ "ariadne-rounded-lg", "ariadne-border", "ariadne-bg-foreground", "dark:ariadne-bg-foreground-dark", "ariadne-text-content", "dark:ariadne-text-content-dark", ] end variants do link do no do [] end yes do [ "hover:ariadne-shadow-md", "hover:ariadne-border-indigo-600", "dark:hover:ariadne-border-indigo-400", "hover:ariadne-bg-foreground-700/10", "dark:hover:ariadne-bg-foreground-300/10", ] end end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems