@carbon/ibm-products
Version:
Carbon for IBM Products
22 lines (21 loc) • 731 B
TypeScript
/**
* Copyright IBM Corp. 2025, 2025
*
* 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 { RefObject } from 'react';
type Item = {
id: string;
};
export declare function useOverflowItems<T extends Item>(items: T[] | undefined, containerRef: RefObject<HTMLElement | null>, offsetRef?: RefObject<HTMLElement | null>, maxItems?: number, onChange?: (value: {
hiddenItems?: T[];
minWidth?: number;
maxWidth?: number;
}) => void): {
visibleItems: T[];
itemRefHandler: (id: string, node: HTMLElement | null) => void;
hiddenItems: T[];
offsetRefHandler: (node: HTMLElement | null) => HTMLElement;
};
export {};