rsnext/packages/next-swc/crates/emotion/tests/fixture/namespace-import/input.tsx
Donny/강동윤 16f7084e7f
feat(next-swc): Update swc crates (#35996)
* Move

* Adjust

* publish = false

* Tree

* Move tests

* fixup

* Split `emotion`

* Split `styled_jsx`

* Split `styled_jsx`

* fmt

* `--fix`

* clippy

* Update crates

* fixup

* publish

* Bump

* Rename

* authors

* Update

* More update

* Oh

* Update test refs

* Update test refs

* Update again

* Fix
2022-04-11 11:59:16 +02:00

32 lines
637 B
TypeScript

import * as emotionReact from '@emotion/react'
import { PureComponent } from 'react'
import ReactDOM from 'react-dom'
const stylesInCallback = (props: any) =>
emotionReact.css({
color: 'red',
background: 'yellow',
width: `${props.scale * 100}px`,
})
const styles = emotionReact.css({
color: 'red',
width: '20px',
})
const styles2 = emotionReact.css`
color: red;
width: 20px;
`
export class SimpleComponent extends PureComponent {
render() {
return (
<div className={styles}>
<span>hello</span>
</div>
)
}
}
ReactDOM.render(<SimpleComponent />, document.querySelector('#app'))