import { Canvg } from "canvg";
export const svg2canvas = (svg: string) => {
    const canvas = document.createElement("canvas");
	const ctx = canvas.getContext("2d");
	if (!ctx) return canvas;
    const v = Canvg.fromString(ctx, svg);
    v.start();
    return canvas;
};
