2022-11-16 01:52:25 -05:00
|
|
|
import styles from "./button-group.module.css"
|
2022-11-16 05:16:56 -05:00
|
|
|
import clsx from "clsx"
|
2022-11-16 01:52:25 -05:00
|
|
|
export default function ButtonGroup({
|
|
|
|
children,
|
2022-11-16 05:16:56 -05:00
|
|
|
vertical,
|
2022-11-16 01:52:25 -05:00
|
|
|
...props
|
|
|
|
}: {
|
|
|
|
children: React.ReactNode | React.ReactNode[]
|
2022-11-16 05:16:56 -05:00
|
|
|
vertical?: boolean
|
2022-11-16 01:52:25 -05:00
|
|
|
} & React.HTMLAttributes<HTMLDivElement>) {
|
|
|
|
return (
|
2022-11-16 05:16:56 -05:00
|
|
|
<div
|
|
|
|
className={clsx(
|
|
|
|
props.className,
|
|
|
|
styles["button-group"],
|
|
|
|
vertical && styles.vertical
|
|
|
|
)}
|
|
|
|
{...props}
|
|
|
|
>
|
2022-11-16 01:52:25 -05:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|