UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

36 lines (35 loc) 1.54 kB
import { FCWithSlotMarker } from "../utils/types/Slots.js"; import { ActionListProps } from "./shared.js"; import { ActionListHeadingProps } from "./Heading.js"; import React from "react"; //#region src/ActionList/Group.d.ts type ActionListGroupProps = React.HTMLAttributes<HTMLLIElement> & { /** * Style variations. Usage is discretionary. * * - `"filled"` - Superimposed on a background, offset from nearby content * - `"subtle"` - Relatively less offset from nearby content */ variant?: 'filled' | 'subtle'; /** * @deprecated (Use `ActionList.GroupHeading` instead. i.e. <ActionList.Group title="Group title"> → <ActionList.GroupHeading>Group title</ActionList.GroupHeading>) */ title?: string; /** * Secondary text which provides additional information about a `Group`. */ auxiliaryText?: string; /** * Whether multiple Items or a single Item can be selected in the Group. Overrides value on ActionList root. */ selectionVariant?: ActionListProps['selectionVariant'] | false; }; declare const Group: FCWithSlotMarker<React.PropsWithChildren<ActionListGroupProps>>; type ActionListGroupHeadingProps = Pick<ActionListGroupProps, 'variant' | 'auxiliaryText'> & Omit<ActionListHeadingProps, 'as'> & React.HTMLAttributes<HTMLElement> & { as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; headingWrapElement?: 'div' | 'li'; _internalBackwardCompatibleTitle?: string; variant?: 'filled' | 'subtle'; }; //#endregion export { ActionListGroupHeadingProps, ActionListGroupProps, Group };