@bumbag/emotion-react
TypeScript icon, indicating that this package has built-in type declarations

11.4.0-0 • Public • Published

@emotion/react

Simple styling in React.

Install

yarn add @emotion/react

Usage

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

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.

/@bumbag/emotion-react/

    Package Sidebar

    Install

    npm i @bumbag/emotion-react

    Weekly Downloads

    2,893

    Version

    11.4.0-0

    License

    MIT

    Unpacked Size

    471 kB

    Total Files

    70

    Last publish

    Collaborators

    • claudia13
    • jmoxey