Class: Shadcn::ToastViewportComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/toast_viewport_component.rb

Overview

Toast Viewport (container for all toasts)

Constant Summary collapse

BASE_CLASSES =
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, #initialize

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

This class inherits a constructor from Shadcn::BaseComponent

Instance Method Details

#callObject



8
9
10
# File 'app/components/shadcn/toast_viewport_component.rb', line 8

def call
  (:ol, content, class: merge_classes(BASE_CLASSES), tabindex: "-1", "data-shadcn--toaster-target": "viewport")
end