So I have 2 .svg files that have been converted into react components via SVGR. So the main image is like say a chassis and I need to embed the second SVG which is a line card into the chassis.js
Say I have for example chassis.js <chassis ref={svg} id={""} /> and lincard.js <lincard ref={svg} id={""} />;
So I can add the linecard.svg as an SVG:image using d3 with something like:
import LineCard from "./linecard.svg"
const elem = d3.select("#chassis");
const g = elem.append("g");
g.append("svg:image")
.attr("id", element.id)
.attr("transform", element.transform)
.attr("xlink:href", LineCard)
.attr("width", dims.width)
.attr("height", dims.height);
But wondering if there is a way to add/embed the SVGR lincard.js into the chassis.js?