mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 13:21:29 +04:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
28 lines
1000 B
Plaintext
28 lines
1000 B
Plaintext
---
|
|
// Modal shell markup. Wrap with <CaptureModal> at the call site to emit at the
|
|
// end of <body> (see PageModals). For inline gallery demos use ModalInline.
|
|
interface Props {
|
|
modalId?: string
|
|
/** core/scss/bootstrap/_modal.scss + ui/_modals.scss `.modal-{size}` modifier classes */
|
|
size?: 'sm' | 'lg' | 'xl' | 'fullscreen' | 'full-width' | undefined
|
|
top?: boolean
|
|
class?: string
|
|
}
|
|
|
|
const { modalId = 'simple', size, top, class: className } = Astro.props
|
|
const titleId = `modal-${modalId}-title`
|
|
|
|
const modalClass = ['modal modal-blur fade', className].filter(Boolean).join(' ')
|
|
const dialogClass = ['modal-dialog', size && `modal-${size}`, !top && 'modal-dialog-centered'].filter(Boolean).join(' ')
|
|
---
|
|
|
|
<!-- BEGIN MODAL -->
|
|
<div class={modalClass} id={`modal-${modalId}`} tabindex="-1" role="dialog" aria-modal="true" aria-labelledby={titleId} aria-hidden="true">
|
|
<div class={dialogClass}>
|
|
<div class="modal-content">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- END MODAL -->
|