@zag-js/dom-query
Version:
The dom helper library for zag.js machines
21 lines (19 loc) • 571 B
TypeScript
type DataUrlType = "image/png" | "image/jpeg" | "image/svg+xml";
interface DataUrlOptions {
/**
* The type of the image
*/
type: DataUrlType;
/**
* The quality of the image
* @default 0.92
*/
quality?: number | undefined;
/**
* The background color of the canvas.
* Useful when type is `image/jpeg`
*/
background?: string | undefined;
}
declare function getDataUrl(svg: SVGSVGElement | undefined | null, opts: DataUrlOptions): Promise<string>;
export { type DataUrlOptions, type DataUrlType, getDataUrl };