diff options
author | 2022-05-20 00:45:51 -0700 | |
---|---|---|
committer | 2022-05-20 00:45:51 -0700 | |
commit | 99d61877d6f411f33e0db578f04b333fb2110ddd (patch) | |
tree | 8802bd59e55c8ed3b5eec695209e59fd28ddfef4 /integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js | |
parent | 224cfa91fb550d3acb5d5fefdcc0594d7a12f1dc (diff) | |
download | bun-99d61877d6f411f33e0db578f04b333fb2110ddd.tar.gz bun-99d61877d6f411f33e0db578f04b333fb2110ddd.tar.zst bun-99d61877d6f411f33e0db578f04b333fb2110ddd.zip |
[solid] more progress, no fragments, but still not right
Diffstat (limited to 'integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js')
-rw-r--r-- | integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js b/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js new file mode 100644 index 000000000..0ffded054 --- /dev/null +++ b/integration/bunjs-only-snippets/solid-dom-fixtures/SVG/code.js @@ -0,0 +1,74 @@ +const template = ( + <svg width="400" height="180"> + <rect + stroke-width="2" + x="50" + y="20" + rx="20" + ry="20" + width="150" + height="150" + style="fill:red;stroke:black;stroke-width:5;opacity:0.5" + /> + <linearGradient gradientTransform="rotate(25)"> + <stop offset="0%"></stop> + </linearGradient> + </svg> +); + +const template2 = ( + <svg width="400" height="180"> + <rect + className={state.name} + stroke-width={state.width} + x={state.x} + y={state.y} + rx="20" + ry="20" + width="150" + height="150" + style={{ + fill: "red", + stroke: "black", + "stroke-width": props.stroke, + opacity: 0.5, + }} + /> + </svg> +); + +const template3 = ( + <svg width="400" height="180"> + <rect {...props} /> + </svg> +); + +const template4 = <rect x="50" y="20" width="150" height="150" />; + +const template5 = ( + <> + <rect x="50" y="20" width="150" height="150" /> + </> +); + +const template6 = ( + <Component> + <rect x="50" y="20" width="150" height="150" /> + </Component> +); + +const template7 = ( + <svg viewBox={"0 0 160 40"} xmlns="http://www.w3.org/2000/svg"> + <a xlink:href={url}> + <text x="10" y="25"> + MDN Web Docs + </text> + </a> + </svg> +); + +const template8 = ( + <svg viewBox={"0 0 160 40"} xmlns="http://www.w3.org/2000/svg"> + <text x="10" y="25" textContent={text} /> + </svg> +); |