MxGraphModel
Usage of _mxGraphModel attribute. You may copy the shape from draw.io, then paste as _mxGraphModel attribute to display as the shape.
- Source
- Diagram
mx-graph-model.tsx
import { Shape } from "@dinghy/base-components";
export default function App() {
return (
<Shape _title="MxGraphModel Example">
<Shape _mxGraphModel='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="Amazon API<br>Gateway<br>" style="outlineConnect=0;fontColor=#232F3E;gradientColor=#945DF2;gradientDirection=north;fillColor=#5A30B5;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.api_gateway;labelBackgroundColor=#ffffff;" vertex="1" parent="1"><mxGeometry x="369.5" y="337.5" width="78" height="78" as="geometry"/></mxCell></root></mxGraphModel>'>
MxGraphModel
</Shape>
</Shape>
);
}
