Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/theme-ui/src/jsx.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { jsx as emotion } from '@emotion/core'
import css from '@styled-system/css'

const getCSS = props => theme => {
const getCSS = props => {
if (!props.sx && !props.css) return undefined
const styles = css(props.sx)(theme)
const raw = typeof props.css === 'function' ? props.css(theme) : props.css
return [styles, raw]
return theme => {
const styles = css(props.sx)(theme)
const raw = typeof props.css === 'function' ? props.css(theme) : props.css
return [styles, raw]
}
}

const parseProps = props => {
Expand Down