Sha256: 2a279039acc9b3c6b0ef25a6ebdef167b05e70dbb1953fffdc6eeba90861c5fa

Contents?: true

Size: 977 Bytes

Versions: 1

Compression:

Stored size: 977 Bytes

Contents

# typed: false
# frozen_string_literal: true

module Ariadne
  module Layout
    module Grid
      class Component < Ariadne::BaseComponent
        renders_many :items, BaseComponent::ACCEPT_ANYTHING

        accepts_html_attributes do |html_attrs|
          html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:item), html_attrs[:class]].join(" "))
        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

1 entries across 1 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.71 app/components/ariadne/layout/grid/component.rb