svg = ({ width, height }, children) => {
const svg = d3
.create("svg")
.attr("class", className)
.attr("fill", "currentColor")
.attr("font-family", "system-ui, sans-serif")
.attr("font-size", 10)
.attr("text-anchor", "middle")
.attr("width", width)
.attr("height", height)
.attr("viewBox", `0 0 ${width} ${height}`)
.attr("aria-label", undefined)
.attr("aria-description", undefined)
.call((svg) =>
svg.append("style").text(`
.${className} {
display: block;
background: white;
height: auto;
height: intrinsic;
max-width: 100%;
}
.${className} text,
.${className} tspan {
white-space: pre;
}
`)
)
.node();
appendChildren(svg, children);
return svg;
}