2024-06-21 11:42:21 +08:00
|
|
|
import type { QRProps } from '@rc-component/qrcode';
|
2023-07-17 23:43:32 +08:00
|
|
|
|
2024-06-21 11:42:21 +08:00
|
|
|
type ImageSettings = QRProps['imageSettings'];
|
2023-07-17 23:43:32 +08:00
|
|
|
|
2024-06-21 11:42:21 +08:00
|
|
|
export type { QRProps, ImageSettings };
|
2023-07-17 23:43:32 +08:00
|
|
|
|
|
|
|
export type QRPropsCanvas = QRProps & React.CanvasHTMLAttributes<HTMLCanvasElement>;
|
|
|
|
|
|
|
|
export type QRPropsSvg = QRProps & React.SVGAttributes<SVGSVGElement>;
|
|
|
|
|
2024-06-10 17:47:45 +08:00
|
|
|
export interface QRCodeProps extends QRProps, React.HTMLAttributes<HTMLDivElement> {
|
2024-06-21 11:42:21 +08:00
|
|
|
type?: 'canvas' | 'svg';
|
2023-07-17 23:43:32 +08:00
|
|
|
className?: string;
|
|
|
|
rootClassName?: string;
|
|
|
|
prefixCls?: string;
|
|
|
|
icon?: string;
|
2024-06-10 17:47:45 +08:00
|
|
|
iconSize?: number | { width: number; height: number };
|
2023-07-17 23:43:32 +08:00
|
|
|
bordered?: boolean;
|
|
|
|
errorLevel?: 'L' | 'M' | 'Q' | 'H';
|
2023-12-30 14:52:08 +08:00
|
|
|
status?: 'active' | 'expired' | 'loading' | 'scanned';
|
2023-07-17 23:43:32 +08:00
|
|
|
onRefresh?: () => void;
|
|
|
|
}
|