@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.
37 lines (36 loc) • 1.26 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
export interface TriggerProps {
triggerRender?: (props?: any) => React.ReactNode;
componentName?: string;
componentProps?: Record<string, any>;
value?: any;
inputValue?: string;
placeholder?: string | string[];
className?: string;
style?: React.CSSProperties;
[x: string]: any;
}
/**
* `Trigger` is a HOC that will cover the inner of components which have popups
*/
declare class Trigger extends React.PureComponent<TriggerProps> {
static propTypes: {
/**
* ({ value?: any, className?: string, style?: React.CSSProperties, ... }) => React.ReactNode
*/
triggerRender: PropTypes.Validator<(...args: any[]) => any>;
/**
* e.g. "AutoComplete", "DatePicker", ...
*/
componentName: PropTypes.Requireable<string>;
componentProps: PropTypes.Requireable<object>;
value: PropTypes.Requireable<any>;
inputValue: PropTypes.Requireable<string>;
placeholder: PropTypes.Requireable<NonNullable<string | any[]>>;
className: PropTypes.Requireable<string>;
style: PropTypes.Requireable<object>;
};
render(): React.ReactNode;
}
export default Trigger;