Closed zeroexcuses closed 1 year ago
It looks like Svg.rect
has props x
and y
:
https://github.com/ml-in-barcelona/jsoo-react/blob/4cae40f36bb9f4b7980e9ca11e63a992b01d3a8f/ppx/html.ml#L1480-L1481
I haven't tested, but I imagine something like this:
open Svg;
module Prop = {
include Html.Prop;
include Svg.Prop;
};
React.Dom.render(
<svg width="100" height="100">
<rect y="20" x="20" width="60" height="60" />
</svg>,
Dom_html.element(c),
)
edit: referenced this block of code for the example above.
How do we set the x/y attributes on Svg.rect ?