UNPKG

@douyinfe/semi-ui

Version:

A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.

54 lines (53 loc) 2.26 kB
import React from 'react'; import PropTypes from 'prop-types'; import BaseComponent from '../_base/baseComponent'; import type { BaseProps } from '../_base/baseComponent'; import type { DropdownContextType } from './context'; export type Type = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger'; export interface DropdownItemProps extends BaseProps { disabled?: boolean; selected?: boolean; onClick?: React.MouseEventHandler<HTMLLIElement>; onMouseEnter?: React.MouseEventHandler<HTMLLIElement>; onMouseLeave?: React.MouseEventHandler<HTMLLIElement>; onContextMenu?: React.MouseEventHandler<HTMLLIElement>; forwardRef?: (ele: HTMLLIElement) => void; type?: Type; active?: boolean; icon?: React.ReactNode; onKeyDown?: (e: React.KeyboardEvent) => void; showTick?: boolean; /** internal prop, please do not use */ hover?: boolean; } declare class DropdownItem extends BaseComponent<DropdownItemProps> { static propTypes: { children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>; name: PropTypes.Requireable<string>; disabled: PropTypes.Requireable<boolean>; selected: PropTypes.Requireable<boolean>; onClick: PropTypes.Requireable<(...args: any[]) => any>; onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>; onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>; onContextMenu: PropTypes.Requireable<(...args: any[]) => any>; className: PropTypes.Requireable<string>; style: PropTypes.Requireable<object>; forwardRef: PropTypes.Requireable<(...args: any[]) => any>; type: PropTypes.Requireable<string>; active: PropTypes.Requireable<boolean>; icon: PropTypes.Requireable<PropTypes.ReactNodeLike>; }; static contextType: React.Context<DropdownContextType>; static elementType: string; context: DropdownContextType; static defaultProps: { disabled: boolean; divided: boolean; selected: boolean; onMouseEnter: (...args: any[]) => void; onMouseLeave: (...args: any[]) => void; forwardRef: (...args: any[]) => void; }; render(): React.JSX.Element; } export default DropdownItem;