import { ToggleButtonGroup as RACToggleButtonGroup, type ToggleButtonGroupProps, } from 'react-aria-components/ToggleButtonGroup'; import { composeRenderProps } from 'react-aria-components/composeRenderProps'; import { tv } from 'tailwind-variants'; const styles = tv({ base: 'flex', variants: { orientation: { horizontal: 'flex-row [&>button]:rounded-none [&>button:first-child]:rounded-l-md [&>button:last-child]:rounded-r-md', vertical: 'flex-col [&>button]:rounded-none [&>button:first-child]:rounded-t-md [&>button:last-child]:rounded-b-md', }, }, }); export function ToggleButtonGroup(props: ToggleButtonGroupProps) { return ( styles({ orientation: props.orientation || 'horizontal', className }), )} /> ); }