@schema-render/search-table-react
Version:
Conditional search table component.
25 lines (24 loc) • 758 B
TypeScript
import type { IMaybePromise } from '@schema-render/core-react';
import type { ButtonProps } from 'antd';
import type { MouseEvent } from 'react';
type IButtonEvent = MouseEvent<HTMLElement, MouseEvent>;
interface IButtonLoadingProps extends Omit<ButtonProps, 'onClick'> {
/**
* 按钮内容
*/
children: React.ReactNode;
/**
* 点击事件处理
*/
onClick?: (e: IButtonEvent) => IMaybePromise<void | unknown>;
/**
* 不要 loading 效果
*/
noLoading?: boolean;
}
/**
* 内置加载 loading 的按钮
* click 事件返回 promise 即可
*/
export default function ButtonLoading({ children, onClick, noLoading, ...restProps }: IButtonLoadingProps): import("react/jsx-runtime").JSX.Element;
export {};