Sha256: e6c0de68411af5e499d73f2df69b30715afb64320e35e091c3dfd2d855c86329

Contents?: true

Size: 1.26 KB

Versions: 24

Compression:

Stored size: 1.26 KB

Contents

# typed: false
# frozen_string_literal: true

module Ariadne
  module UI
    module Dialog
      class Component < Ariadne::BaseComponent
        option :title
        option :trigger_close_label
        option :description, optional: true
        option :width, default: proc { :base }

        renders_one :trigger
        renders_one :footer

        accepts_html_attributes

        style do
          base do
            [
              "ariadne-fixed",
              "ariadne-max-h-[90-vh]",
              "ariadne-shadow-xl",
              "ariadne-rounded-2xl",
              "ariadne-bg-foreground",
              "dark:ariadne-bg-foreground-dark",
              "ariadne-text-content",
              "dark:ariadne-text-content-dark",
              "backdrop:ariadne-bg-zinc-900/20",
              "backdrop:dark:ariadne-bg-zinc-100/20",
            ]
          end
          variants do
            width do
              base do
                [
                  "ariadne-w-96",
                  "ariadne-max-w-[90vw]",
                ]
              end

              wide do
                [
                  "ariadne-w-3/5",
                  "ariadne-max-w-[90vw]",
                ]
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.92 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.91 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.90 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.89.1 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.89 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.88 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.87 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.9 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.8 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.7 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.6 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.5 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.4 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.3 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.2 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86.1 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.86 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.85 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.84 app/components/ariadne/ui/dialog/component.rb
ariadne_view_components-0.0.83.3 app/components/ariadne/ui/dialog/component.rb