10.0.17 • Published 6 years ago

@databyss-org/emotion-core v10.0.17

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

@databyss-org/emotion-core

forked from @emotion/core

Adds support for passing theme to functions in array css prop. https://github.com/emotion-js/emotion/pull/1130

Install

yarn add @databyss-org/emotion-core

Usage

/** @jsx jsx */
import { jsx, css, Global, ClassNames } from '@emotion/core'

render(
  <div css={{ color: 'hotpink' }}>
    <div
      css={css`
        color: green;
      `}
    />
    <Global
      styles={{
        body: {
          margin: 0,
          padding: 0
        }
      }}
    />
    <ClassNames>
      {({ css, cx }) => (
        <div
          className={cx(
            'some-class',
            css`
              color: yellow;
            `
          )}
        />
      )}
    </ClassNames>
  </div>
)

More documentation is available at https://emotion.sh.