/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/components/modals/Modal.astro
27 строк
1000 B
Paweł Kuna
Narrow component prop types, remove unused props and dead code (#2838)
10 авг 2026, 00:14
Не верифицирован
10 авг 2026, 00:14
4f7beec
Код
Авторство
О чём код?
--- // 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 -->