mirror of
https://github.com/tabler/tabler.git
synced 2026-10-14 06:07:07 +04:00
25 lines
575 B
Plaintext
25 lines
575 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?: string;
|
|
/** 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>
|