Sha256: dd973408073f9df5dfa8fc6efbf2305ddf32dceb5c5c99a6444634a0ef977c57
Contents?: true
Size: 1.41 KB
Versions: 34
Compression:
Stored size: 1.41 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-bg-foreground", "dark:ariadne-bg-foreground-dark", "ariadne-text-content", "dark:ariadne-text-content-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
34 entries across 34 versions & 1 rubygems