UNPKG

@liquid-js/qr-code-styling

Version:

Generate styled QR codes on web or in Node

40 lines (39 loc) 1.3 kB
import { Options, Plugin } from '../utils/options.js'; declare enum TextPosition { top = "top", bottom = "bottom", left = "left", right = "right" } export interface TextConfig { font?: string; color?: string; size?: number; fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number; fontStyle?: 'normal' | 'italic' | 'oblique'; } export interface BorderPluginOptions { /** Border roundnes, from 0 (square) to 1 (circle) */ round?: number; size: number; color: string; dasharray?: string; margin?: number; text?: TextConfig & { [key in TextPosition]?: TextConfig & { content: string; }; }; /** A string of embedded CSS @font-face rules */ fontFaces?: string; } export declare class BorderPlugin implements Plugin { private readonly pluginOptions; /** @ignore Create unique id for SVG elements to prevent naming collisions; specify your own if neccesary e.g. for testing */ private readonly idSuffix; constructor(pluginOptions: BorderPluginOptions, /** @ignore Create unique id for SVG elements to prevent naming collisions; specify your own if neccesary e.g. for testing */ idSuffix?: string); postProcess(svg: SVGSVGElement, options: Options): void; } export {};