mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
parent
f5725e3c89
commit
a396e3779a
@ -28,6 +28,9 @@ export { Carousel };
|
||||
import Cascader from './cascader';
|
||||
export { Cascader };
|
||||
|
||||
import Popconfirm from './popconfirm';
|
||||
export { Popconfirm };
|
||||
|
||||
import Transfer from './transfer';
|
||||
export { Transfer };
|
||||
|
||||
|
@ -8,7 +8,33 @@ const placements = getPlacements();
|
||||
const prefixCls = 'ant-popover';
|
||||
const noop = () => {};
|
||||
|
||||
export default class Popconfirm extends React.Component {
|
||||
export interface PopconfirmProps {
|
||||
|
||||
/**
|
||||
* Position of popup-container, options:`top`, `left`, `right`, `bottom`
|
||||
*/
|
||||
placement?: 'top' | 'left' | 'right' | 'bottom';
|
||||
/** Description of Popconfirm */
|
||||
title: React.ReactNode;
|
||||
/** Callback when confirm */
|
||||
onConfirm?: () => void;
|
||||
/** Callback when cancel */
|
||||
onCancel?: () => void;
|
||||
/** Callback when display/hide */
|
||||
onVisibleChange?: (visible: boolean) => void;
|
||||
/** Confirm button text */
|
||||
okText?: React.ReactNode;
|
||||
/** Cancel button text */
|
||||
cancelText?: React.ReactNode;
|
||||
style?: React.CSSProperties;
|
||||
transitionName?: string;
|
||||
trigger?: 'hover' | 'focus' | 'click';
|
||||
/** Style of overlay */
|
||||
overlayStyle?: React.CSSProperties;
|
||||
prefixCls?: string;
|
||||
}
|
||||
|
||||
export default class Popconfirm extends React.Component<PopconfirmProps, any> {
|
||||
static defaultProps = {
|
||||
transitionName: 'zoom-big',
|
||||
placement: 'top',
|
||||
|
@ -20,8 +20,18 @@ export interface TooltipProps {
|
||||
*/
|
||||
placement?: PopoverPlacement;
|
||||
/** 提示文字 */
|
||||
title?: string | React.ReactNode;
|
||||
title: React.ReactNode;
|
||||
style?: React.CSSProperties;
|
||||
builtinPlacements?: Object;
|
||||
/** Style of overlay */
|
||||
overlayStyle?: React.CSSProperties;
|
||||
prefixCls?: string;
|
||||
/** Callback when display/hide */
|
||||
onVisibleChange?: (visible: boolean) => void;
|
||||
transitionName?: string;
|
||||
visible?: boolean;
|
||||
trigger?: 'hover' | 'focus' | 'click';
|
||||
overlay?: React.ReactNode;
|
||||
}
|
||||
|
||||
export default class Tooltip extends React.Component<TooltipProps, any> {
|
||||
|
Loading…
Reference in New Issue
Block a user