@patternfly/react-core
Version:
This library provides a set of common React components for use with the PatternFly reference implementation.
42 lines • 2.27 kB
TypeScript
import { Component } from 'react';
import { LabelGroupProps } from '../../../components/Label';
import { TooltipPosition } from '../../../components/Tooltip';
import { OUIAProps } from '../../../helpers';
export interface ChipGroupProps extends Omit<LabelGroupProps, 'ref'>, OUIAProps {
/** Content rendered inside the chip group. Should be <Chip> elements. */
children?: React.ReactNode;
/** Additional classes added to the chip item */
className?: string;
/** Flag for having the chip group default to expanded */
defaultIsOpen?: boolean;
/** Customizable "Show Less" text string */
expandedText?: string;
/** Customizable template string. Use variable "${remaining}" for the overflow chip count. */
collapsedText?: string;
/** Category name text for the chip group category. If this prop is supplied the chip group with have a label and category styling applied */
categoryName?: string;
/** Aria label for chip group that does not have a category name */
'aria-label'?: string;
/** Set number of chips to show before overflow */
numChips?: number;
/** Flag if chip group can be closed*/
isClosable?: boolean;
/** Aria label for close button */
closeBtnAriaLabel?: string;
/** Function that is called when clicking on the chip group close button or on an overflow chip */
onClick?: (event: React.MouseEvent) => void;
/** @deprecated Function that is called when clicking on the overflow (expand/collapse) chip button */
onOverflowChipClick?: (event: React.MouseEvent) => void;
/** Position of the tooltip which is displayed if the category name text is longer */
tooltipPosition?: TooltipPosition | 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
/** Value to overwrite the randomly generated data-ouia-component-id.*/
ouiaId?: number | string;
}
declare class ChipGroup extends Component<ChipGroupProps> {
static displayName: string;
constructor(props: ChipGroupProps);
static defaultProps: ChipGroupProps;
render(): import("react/jsx-runtime").JSX.Element;
}
export { ChipGroup };
//# sourceMappingURL=ChipGroup.d.ts.map