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>
21 lines
590 B
Plaintext
21 lines
590 B
Plaintext
---
|
|
// Button group container (.btn-group / .btn-group-vertical).
|
|
|
|
interface Props {
|
|
/** use .btn-group-vertical instead of .btn-group */
|
|
vertical?: boolean
|
|
/** btn-group-{size}: sm | lg | xl */
|
|
size?: string
|
|
class?: string
|
|
role?: astroHTML.JSX.AriaRole
|
|
/** remaining attributes (aria-label, …) are forwarded */
|
|
[key: string]: unknown
|
|
}
|
|
|
|
const { vertical, size, class: className, role = 'group', ...rest } = Astro.props
|
|
---
|
|
|
|
<div class:list={[vertical ? 'btn-group-vertical' : 'btn-group', size && `btn-group-${size}`, className]} role={role} {...rest}>
|
|
<slot />
|
|
</div>
|