Sha256: 537765c2a6383e3e0cc2d4f119ad7598c3db4924f085fe5ece3c87e9c8ec73e3
Contents?: true
Size: 1.32 KB
Versions: 2
Compression:
Stored size: 1.32 KB
Contents
# typed: false # frozen_string_literal: true module Ariadne module UI module Overlay class Component < Ariadne::BaseComponent renders_one :trigger, Ariadne::UI::Button::Component accepts_html_attributes do |html_attrs| html_attrs[:data] = { controller: [stimulus_name, html_attrs.fetch(:data, {}).fetch(:controller, nil)].compact.join(" "), "#{stimulus_name}-placement-value": placement, "#{stimulus_name}-clamped-value": clamped, } end option :size, default: proc { :base } option :placement, default: proc { "bottom" } option :clamped, default: proc { false } style do base do [ "ariadne-fixed", "ariadne-max-w-[90vw]", "ariadne-z-20", "ariadne-scroll", "ariadne-scrollbar-trigger", "ariadne-rounded-lg", "ariadne-shadow-lg", "ariadne-background", "dark:ariadne-background-dark", ] end variants do size do sm { "ariadne-w-36" } md { "ariadne-w-52" } base { "ariadne-w-64" } lg { "ariadne-w-96" } end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ariadne_view_components-0.0.76.1 | app/components/ariadne/ui/overlay/component.rb |
ariadne_view_components-0.0.76 | app/components/ariadne/ui/overlay/component.rb |