rsnext/packages/next/build/swc/tests/fixture/styled-jsx/multiple-jsx/output.js
Maia Teegarden 4a2d5a1b49
Add/styled jsx swc (#29005)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-09-15 09:24:31 +02:00

25 lines
No EOL
933 B
JavaScript

import _JSXStyle from "styled-jsx/style";
const attrs = {
id: "test"
};
const Test1 = ()=><div className={"jsx-a9535d7d5f32c3c4"}>
<span {...attrs} data-test="test" className={"jsx-a9535d7d5f32c3c4" + " " + (attrs && attrs.className != null && attrs.className || "")}>test</span>
<Component />
<_JSXStyle id={"a9535d7d5f32c3c4"}>{"span.jsx-a9535d7d5f32c3c4 {color:red}"}</_JSXStyle>
</div>
;
const Test2 = ()=><span >test</span>
;
const Test3 = ()=><div className={"jsx-a9535d7d5f32c3c4"}>
<span className={"jsx-a9535d7d5f32c3c4"}>test</span>
<_JSXStyle id={"a9535d7d5f32c3c4"}>{"span.jsx-a9535d7d5f32c3c4 {color:red}"}</_JSXStyle>
</div>
;
export default class {
render() {
return <div className={"jsx-b2b86d63f35d25ee"}>
<p className={"jsx-b2b86d63f35d25ee"}>test</p>
<_JSXStyle id={"b2b86d63f35d25ee"}>{"p.jsx-b2b86d63f35d25ee {color:red}"}</_JSXStyle>
</div>;
}
}