mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-09 13:14:59 +08:00
b534c1ecb4
* fet: QRCode support type(renderAs) * fet: QRCode support type(renderAs) * fet: QRCode support type(renderAs) * fet: QRCode support type(renderAs) * fix: Improve type.md, export QRProps * Update components/qrcode/demo/type.md Co-authored-by: lijianan <574980606@qq.com> * Update components/qrcode/index.tsx Co-authored-by: lijianan <574980606@qq.com> * fix: qrCodeProps * fix: qrcode snap * Update components/qrcode/demo/type.md Co-authored-by: lijianan <574980606@qq.com> * fix: QRCode docs * fix: QRCode demo * Update components/qrcode/demo/download.tsx Co-authored-by: lijianan <574980606@qq.com> * Update components/qrcode/demo/download.tsx Co-authored-by: lijianan <574980606@qq.com> * fix: QRCode snap * fix: QRCode snap * fix: 恢复下载示例 --------- Co-authored-by: lijianan <574980606@qq.com>
36 lines
831 B
TypeScript
36 lines
831 B
TypeScript
import type { CSSProperties } from 'react';
|
|
|
|
interface ImageSettings {
|
|
src: string;
|
|
height: number;
|
|
width: number;
|
|
excavate: boolean;
|
|
x?: number;
|
|
y?: number;
|
|
}
|
|
|
|
export interface QRProps {
|
|
value: string;
|
|
type?: 'canvas' | 'svg';
|
|
size?: number;
|
|
color?: string;
|
|
style?: CSSProperties;
|
|
includeMargin?: boolean;
|
|
imageSettings?: ImageSettings;
|
|
bgColor?: string;
|
|
}
|
|
|
|
export type QRPropsCanvas = QRProps & React.CanvasHTMLAttributes<HTMLCanvasElement>;
|
|
export type QRPropsSvg = QRProps & React.SVGAttributes<SVGSVGElement>;
|
|
export interface QRCodeProps extends QRProps {
|
|
className?: string;
|
|
rootClassName?: string;
|
|
prefixCls?: string;
|
|
icon?: string;
|
|
iconSize?: number;
|
|
bordered?: boolean;
|
|
errorLevel?: 'L' | 'M' | 'Q' | 'H';
|
|
status?: 'active' | 'expired' | 'loading';
|
|
onRefresh?: () => void;
|
|
}
|