zent
Version:
一套前端设计语言和基于React的实现
27 lines (22 loc) • 688 B
TypeScript
/// <reference types="react" />
declare module 'zent/lib/sweetalert' {
namespace Sweetalert {
interface IAlertOption {
content: React.ReactNode
type: 'info' | 'success' | 'error' | 'warning'
title?: React.ReactNode
onConfirm?: () => void | Promise<any>
confirmText?: string
confirmType?: 'default' | 'primary' | 'danger' | 'success'
className?: string
prefix?: string
}
interface IConfirmOption extends IAlertOption {
onCancel?: () => void
cancelText?: string
}
function alert(option: IAlertOption): () => void
function confirm(option: IConfirmOption): () => void
}
export default Sweetalert
}