Sha256: 5ca7045ea42c143cee931c445b6d3b94190c80851beafbe9223b1811f98a9e40
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
# typed: false # frozen_string_literal: true module Ariadne module Layout module Grid class Component < Ariadne::BaseComponent renders_many :items, Ariadne::Layout::Grid::Item::Component accepts_html_attributes do |html_attrs| html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:grid), html_attrs[:class]].join(" ")) end style :grid do base do [ "ariadne-grid", "ariadne-grid-cols-1", "ariadne-gap-6", "sm:ariadne-grid-cols-2", "md:ariadne-grid-cols-3", "lg:ariadne-grid-cols-4", ] end end style :item do base do [ "ariadne-flex", "ariadne-flex-col", "ariadne-gap-3", "ariadne-p-3", "ariadne-ps-4", "ariadne-rounded-xl", "ariadne-border", "ariadne-border-black/10", "dark:ariadne-border-white/10", "ariadne-bg-white", "dark:ariadne-bg-zinc-950", "hover:ariadne-shadow-lg", "ariadne-transition-shadow", ] end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ariadne_view_components-0.0.73 | app/components/ariadne/layout/grid/component.rb |
ariadne_view_components-0.0.72 | app/components/ariadne/layout/grid/component.rb |