@carbon/ibm-products
Version:
Carbon for IBM Products
79 lines • 2.43 kB
TypeScript
/**
* Copyright IBM Corp. 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { ReactNode } from 'react';
import { type AccordionProps, type AccordionItemProps, type IconButtonProps } from '@carbon/react';
import type { AddSelectItem } from '@carbon/ibm-products';
/**
* ----------------
* AddSelectSelectionSummaryItem
* ----------------
*/
export interface AddSelectSelectionSummaryItemProps {
/**
* Item data
*/
item: AddSelectItem;
/**
* Custom title renderer (only works with useAccordion mode)
*/
renderAccordionTitle?: (item: AddSelectItem) => ReactNode;
/**
* Custom content renderer (only works with useAccordion mode)
*/
renderAccordionBody?: (item: AddSelectItem) => ReactNode;
/**
* Custom renderer for rendering the entire item content
* Takes precedence over all other rendering props
*/
renderItem?: (item: AddSelectItem, onRemove?: (id: string) => void) => ReactNode;
/**
* Custom content - takes highest priority
*/
children?: ReactNode;
/**
* Remove button handler
*/
onRemove?: (itemId: string) => void;
/**
* Remove button aria-label
*/
removeButtonLabel?: string;
/**
* Use accordion pattern (default: false)
*/
useAccordion?: boolean;
/**
* Optional class name
*/
className?: string;
/**
* Additional props to pass to the Accordion component
*/
accordionProps?: Omit<AccordionProps, 'align' | 'children'>;
/**
* Additional props to pass to the AccordionItem component
*/
accordionItemProps?: Omit<AccordionItemProps, 'title' | 'children'>;
/**
* Additional props to pass to the remove IconButton
*/
removeIconButtonProps?: Omit<IconButtonProps, 'label' | 'onClick' | 'kind' | 'className' | 'children'>;
}
/**
* AddSelectSelectionSummaryItem - Individual selected item display
* @example
* ```jsx
* <AddSelect.SelectionSummaryItem
* item={item}
* useAccordion
* onRemove={handleRemove}
* />
* ```
*/
declare const AddSelectSelectionSummaryItem: React.ForwardRefExoticComponent<AddSelectSelectionSummaryItemProps & React.RefAttributes<HTMLDivElement>>;
export default AddSelectSelectionSummaryItem;
//# sourceMappingURL=AddSelectSelectionSummaryItem.d.ts.map