Class: Shadcn::Dialog::Component

Inherits:
ApplicationViewComponent show all
Includes:
Concerns::ModalRoot
Defined in:
app/components/shadcn/dialog/component.rb

Overview

Port of registry/new-york-v4/ui/dialog.tsx

Radix's Dialog.Root is a context provider and renders no DOM. Stimulus needs an element to attach to, so the root is a display: contents wrapper — invisible to layout, and it gives shadcn's data-slot="dialog" somewhere to live.

Constant Summary

Constants inherited from ApplicationViewComponent

ApplicationViewComponent::CONTENTS_STYLE, ApplicationViewComponent::VOID_TAGS

Instance Attribute Summary

Attributes inherited from ApplicationViewComponent

#attributes

Method Summary

Methods included from Concerns::ModalRoot

#call, #dismissable?, #element_attributes, included, #initialize

Methods inherited from ApplicationViewComponent

#call, #css_classes, default_tag, #element_attributes, #initialize, #merged_style, #render_element, #shadcn_t, slot_name, #style_variants, #tag_name