UNPKG

@hhgtech/hhg-components

Version:
30 lines (29 loc) 1.03 kB
import React, { Dispatch, SetStateAction, ReactNode, CSSProperties } from 'react'; import { Props as PopoverMenuProps } from "./index"; export type TreeProps = { data?: TreeDataProps; setShow?: Dispatch<SetStateAction<boolean>>; }; export type Props = PopoverMenuProps & TreeProps; export type TreeDataProps = { title?: string; description?: string; isShowheader?: boolean; type: 'jsx' | 'list'; jsxRenderer?: (setShow?: (v: boolean) => void) => ReactNode; list?: ListItemProps[]; } | null; export type ListItemProps = { icon?: string | null; label: string; onClick?: () => void; subTree?: TreeDataProps; selected?: boolean; style?: CSSProperties; className?: string; dataEventCategory?: string; dataEventAction?: string; dataEventLabel?: string; }; export declare const TreePopoverMenu: ({ data, ...popoverProps }: Props) => React.JSX.Element; export declare const Tree: ({ data, setShow }: TreeProps) => React.JSX.Element;