Class: Shadcn::ToastViewportComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::ToastViewportComponent
- 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
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
This class inherits a constructor from Shadcn::BaseComponent
Instance Method Details
#call ⇒ Object
8 9 10 |
# File 'app/components/shadcn/toast_viewport_component.rb', line 8 def call content_tag(:ol, content, class: merge_classes(BASE_CLASSES), tabindex: "-1", "data-shadcn--toaster-target": "viewport") end |