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>
20 lines
565 B
Plaintext
20 lines
565 B
Plaintext
---
|
|
// Composable card container (.card). For the fixed demo-showcase card see ../cards/Card.astro.
|
|
|
|
interface Props {
|
|
/** element to render instead of div (e.g. form, a) */
|
|
as?: string
|
|
/** card-{size} body padding: sm | md | lg */
|
|
size?: string
|
|
class?: string
|
|
/** remaining attributes (id, action, data-*, …) are forwarded to the element */
|
|
[key: string]: unknown
|
|
}
|
|
|
|
const { as: Element = 'div', size, class: className, ...rest } = Astro.props
|
|
---
|
|
|
|
<Element class:list={['card', size && `card-${size}`, className]} {...rest}>
|
|
<slot />
|
|
</Element>
|