mirror of
https://github.com/tabler/tabler.git
synced 2026-08-07 03:42:27 +04:00
8962710163
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
24 lines
507 B
Plaintext
24 lines
507 B
Plaintext
---
|
|
// Offcanvas header (.offcanvas-header) with an optional h2.offcanvas-title; slot renders after the title.
|
|
|
|
interface Props {
|
|
title?: string
|
|
/** id on the title heading, referenced by the offcanvas root's aria-labelledby */
|
|
titleId?: string
|
|
class?: string
|
|
}
|
|
|
|
const { title, titleId, class: className } = Astro.props
|
|
---
|
|
|
|
<div class:list={['offcanvas-header', className]}>
|
|
{
|
|
title && (
|
|
<h2 class="offcanvas-title" id={titleId}>
|
|
{title}
|
|
</h2>
|
|
)
|
|
}
|
|
<slot />
|
|
</div>
|