qrcode-kr
Version:
A customizable QR code generator for React and Next.js with logo support and styling options
34 lines (33 loc) • 766 B
TypeScript
export interface QRStyle {
backgroundColor?: string;
foregroundColor?: string;
dotStyle?: 'square' | 'rounded' | 'dots';
cornerStyle?: 'square' | 'rounded';
gradient?: {
type: 'linear' | 'radial';
colors: string[];
direction?: number;
};
}
export interface LogoOptions {
src: string;
width?: number;
height?: number;
x?: number;
y?: number;
borderRadius?: number;
border?: {
width: number;
color: string;
};
}
export interface QRCodeKRProps {
value: string;
size?: number;
level?: 'L' | 'M' | 'Q' | 'H';
style?: QRStyle;
logo?: LogoOptions;
className?: string;
onGenerated?: (dataURL: string) => void;
onError?: (error: Error) => void;
}