"use client"; /* * Documentation: * Button Group — https://app.subframe.com/f023064a5ca0/library?component=Button+Group_e0379327-50f0-4852-9ae1-ad09b4bf01d3 */ import React from "react"; import * as SubframeUtils from "../../utils"; export interface ButtonGroupRootProps extends React.HTMLAttributes { variant?: "grouped" | "split"; align?: "start" | "end" | "center" | "justify" | "stack" | "space-between"; children?: React.ReactNode; className?: string; } const ButtonGroupRoot = React.forwardRef( function ButtonGroupRoot( { variant = "grouped", align = "start", children, className, ...otherProps }: ButtonGroupRootProps, ref ) { return children ? (
*]:rounded-md": align === "space-between", "flex-col": align === "stack", "justify-center": align === "center", "justify-end": align === "end", "gap-0": variant === "split", }, className )} ref={ref} {...otherProps} > {children}
) : null; } ); export const ButtonGroup = ButtonGroupRoot;