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> Co-authored-by: codecalm <1282324+codecalm@users.noreply.github.com>
22 lines
583 B
Plaintext
22 lines
583 B
Plaintext
---
|
|
import type { HTMLTag } from 'astro/types'
|
|
|
|
// Section subheader label (.subheader).
|
|
|
|
// `as` must stay out of the Props body: Astro's frontmatter scanner bails on a member
|
|
// literally named `as` and silently falls back to untyped props.
|
|
type PolymorphicProps = { as?: HTMLTag }
|
|
|
|
interface Props extends PolymorphicProps {
|
|
class?: string
|
|
/** remaining attributes (colspan, …) are forwarded */
|
|
[key: string]: unknown
|
|
}
|
|
|
|
const { as: Tag = 'div', class: className, ...rest }: Props = Astro.props
|
|
---
|
|
|
|
<Tag class:list={['subheader', className]} {...rest}>
|
|
<slot />
|
|
</Tag>
|