UNPKG

@clayui/drop-down

Version:

ClayDropDown component

55 lines (54 loc) 1.57 kB
/** * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com> * SPDX-License-Identifier: BSD-3-Clause */ import React from 'react'; export declare const findNested: <T extends { [key: string]: any; items?: T[] | undefined; }, K extends keyof T>(items: T[], key: K) => boolean; declare type Context = { back?: () => void; close: () => void; onForward?: (label: string, id: string) => void; messages?: Record<string, string>; }; export declare const ClayDropDownContext: React.Context<Context>; export declare type Item = { active?: boolean; checked?: boolean; disabled?: boolean; href?: string; /** * The unique id that references the next menu. */ child?: string; title?: string; items?: Array<Item>; /** * @deprecated since v3.129.0 - use `title` instead. */ label?: string; name?: string; onChange?: Function; onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void; symbolLeft?: string; symbolRight?: string; target?: string; type?: 'checkbox' | 'contextual' | 'group' | 'item' | 'radio' | 'radiogroup' | 'divider'; value?: string; }; export declare type Props = { 'aria-label'?: string; /** * The path to the SVG spritemap file containing the icons. */ spritemap?: string; /** * List of items to display in drop down menu */ items: Array<Item>; role?: string; }; export declare const DropDownItems: ({ items, role, spritemap, ...otherProps }: Props) => JSX.Element; export {};