import React from 'react'; export type ButtonGroupAlign = 'start' | 'center' | 'end'; export type ButtonGroupOverflow = 'wrap' | 'menu'; export interface ButtonGroupProps extends Omit, 'children'> { /** * The actions, least important first and the primary last — the order * they are read and tabbed in, and the order they are drawn. Nothing is * reordered to put the primary on the right. */ children: React.ReactNode; /** * Actions pinned to the start edge, apart from the rest: Back in a * wizard, a destructive "Delete" in an edit dialog. They never collapse. */ start?: React.ReactNode; /** Where the actions sit. Default `end`, the dialog and form convention. */ align?: ButtonGroupAlign; /** * `wrap` (default): actions that do not fit move to a second line. * `menu`: Buttons that do not fit move into a "More actions" menu at the * start of the row, the first Button first. The last child — the primary — * never moves, and neither does anything that is not a Button; the * Buttons after it still can. */ overflow?: ButtonGroupOverflow; /** * Below 32rem of viewport, every action takes the full width, one per * line, still in reading order — so the primary is last, nearest the * thumb. For dialog and form footers. */ stack?: boolean; /** The overflow trigger's name. Default "More actions" — pass the translation. */ moreLabel?: string; } /** * ButtonGroup — a row of actions: a dialog's Cancel and Confirm, a form's * Back, Save and Next, the actions at the top of a record. * * WHAT IT OWNS, SO NO CALLER HAS TO * * - Spacing: 8px between actions, everywhere. Before this, dialogs used * 12, drawers and page headers 8, and forms whatever their author chose. * - Order: children are drawn in the order they are read. The primary * goes last, so it lands at the end of the row in either direction — * and at the bottom, nearest the thumb, when `stack` stacks them. There * is no `row-reverse`: an order that differs on screen and in the Tab * sequence fails WCAG 2.4.3. * - Overflow, when asked: `overflow="menu"` measures the row and moves * the Buttons that do not fit into a MenuTrigger, first Button first. A * menu item presses the real Button, which stays in the page hidden — * so its `onPress`, its `onClick` and a `type="submit"` all behave as * if it had been clicked. * * NOT A TOOLBAR. Every action here is its own tab stop, which is what a * keyboard user expects of two or three buttons. A row of many controls on * one thing — formatting, a table's batch actions — is a Toolbar: one tab * stop, arrow keys inside. */ export declare function ButtonGroup({ children, start, align, overflow, stack, moreLabel, className, ...rest }: ButtonGroupProps): React.JSX.Element; export declare namespace ButtonGroup { var displayName: string; } //# sourceMappingURL=ButtonGroup.d.ts.map