mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 07:09:55 +08:00
816cf10524
* fix: update demo * Update components/qrcode/index.tsx Co-authored-by: MadCcc <1075746765@qq.com> * Update index.test.tsx Co-authored-by: MadCcc <1075746765@qq.com>
33 lines
681 B
TypeScript
33 lines
681 B
TypeScript
import type { CSSProperties } from 'react';
|
|
|
|
interface ImageSettings {
|
|
src: string;
|
|
height: number;
|
|
width: number;
|
|
excavate: boolean;
|
|
x?: number;
|
|
y?: number;
|
|
}
|
|
|
|
interface QRProps {
|
|
value: string;
|
|
size?: number;
|
|
color?: string;
|
|
style?: CSSProperties;
|
|
includeMargin?: boolean;
|
|
imageSettings?: ImageSettings;
|
|
}
|
|
|
|
export type QRPropsCanvas = QRProps & React.CanvasHTMLAttributes<HTMLCanvasElement>;
|
|
|
|
export interface QRCodeProps extends QRProps {
|
|
className?: string;
|
|
prefixCls?: string;
|
|
icon?: string;
|
|
iconSize?: number;
|
|
bordered?: boolean;
|
|
errorLevel?: 'L' | 'M' | 'Q' | 'H';
|
|
status?: 'active' | 'expired' | 'loading';
|
|
onRefresh?: () => void;
|
|
}
|