UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

44 lines 2.1 kB
import React from 'react'; import { type ActionListProps } from './shared'; import type { ActionListHeadingProps } from './Heading'; import type { FCWithSlotMarker } from '../utils/types/Slots'; export 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; }; type ContextProps = Pick<ActionListGroupProps, 'selectionVariant'> & { groupHeadingId: string | undefined; }; export declare const GroupContext: React.Context<ContextProps>; export declare const Group: FCWithSlotMarker<React.PropsWithChildren<ActionListGroupProps>>; export 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'; }; export declare const GroupHeading: React.FC<React.PropsWithChildren<ActionListGroupHeadingProps>> & import("..").SlotMarker & { TrailingAction: import("../utils/polymorphic").ForwardRefComponent<"a" | "button", import("./GroupHeadingTrailingAction").ActionListGroupHeadingTrailingActionProps> & { __SLOT__?: import("..").SlotMarker; displayName?: string; }; }; export {}; //# sourceMappingURL=Group.d.ts.map