import * as React from 'react'; import PropTypes from 'prop-types'; interface WatermarkProps { text: string; prefixCls: string; className: string; img: string; color: string; font: string; rotate: number; width: number; height: number; type: 'foreground' | 'background'; size: [number | string, number | string]; convert: boolean | 'png' | 'jpeg'; style: React.CSSProperties; watermarkStyle: React.CSSProperties; } interface WatermarkStates { bgImg: string; domImg: string; } declare class Watermark extends React.Component { static defaultProps: { style: {}; watermarkStyle: string; prefixCls: string; text: string; color: string; font: string; rotate: number; width: number; height: number; className: string; size: string[]; type: "foreground" | "background"; convert: boolean; }; static propTypes: { text: PropTypes.Requireable; color: PropTypes.Requireable; font: PropTypes.Requireable; rotate: PropTypes.Requireable; width: PropTypes.Requireable; height: PropTypes.Requireable; }; static api: (dom: HTMLElement, options: WatermarkProps, cb?: (dataUrl: string) => {}) => any; static domtoimage: (dom: HTMLElement, type?: "png" | "jpeg" | undefined) => Promise; canvas: HTMLCanvasElement | null; ctx: CanvasRenderingContext2D | null; container: HTMLDivElement; constructor(props: WatermarkProps); componentDidMount(): void; UNSAFE_componentWillReceiveProps(nextProps: WatermarkProps): void; createImg(props: WatermarkProps): void; render(): JSX.Element; } export default Watermark;