@qr-platform/qr-code.js
Version:
QRCode.js is a professional JavaScript/TypeScript library for creating customized QR codes, offering a blend of simplicity and sophistication. With versatile styling options—dot shapes, colors, gradients, embedded images, borders, and text—it enables you
28 lines (27 loc) • 708 B
TypeScript
export declare enum GradientType {
radial = "radial",
linear = "linear"
}
export type GradientTypeStrings = `${GradientType}`;
export interface Gradient {
/**
* Type of gradient spread
*
* @default GradientType.linear
*/
type: GradientType | GradientTypeStrings;
/**
* Rotation of gradient (in radians, Math.PI === 180 degrees)
*
* @default 0
*/
rotation?: number;
/** Gradient colors. */
colorStops: Array<{
/** Position of color in gradient range */
offset: number;
/** Color of stop in gradient range */
color: string;
}>;
}
export declare function sanitizeGradient(gradient: Gradient): Gradient;