// // Copyright 2026 DXOS.org // import { ark } from '@ark-ui/react/factory'; import React from 'react'; import { recipes } from '../../recipes.ts'; import { composableProps, slottable } from '../../util/slots.ts'; export type GroupProps = { justify?: 'start' | 'end' | 'between'; /** Children share the width equally, so a lone child (e.g. a form's Submit) stretches across the group. */ fill?: boolean; /** No gap between children: a run of icon-only buttons whose own insets already space them (e.g. plank controls). */ compact?: boolean; }; /** * A plain flex run of controls (e.g. a form's action buttons) with no role: unlike Toolbar it claims no keyboard * contract, and unlike a row Container it needs no track per child. */ export const Group = slottable( ({ children, asChild, justify = 'start', fill, compact, ...props }, forwardedRef) => { const { className, ...rest } = composableProps(props, { classNames: recipes.group() }); return ( {children} ); }, ); Group.displayName = 'Group';