You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hugo Oliveira a3df380b57 versao 1 1 year ago
..
_isolated-hnrs versao 1 1 year ago
dist versao 1 1 year ago
jsx-dev-runtime versao 1 1 year ago
jsx-runtime versao 1 1 year ago
src versao 1 1 year ago
types versao 1 1 year ago
LICENSE versao 1 1 year ago
README.md versao 1 1 year ago
macro.d.mts versao 1 1 year ago
macro.d.ts versao 1 1 year ago
macro.js versao 1 1 year ago
macro.js.flow versao 1 1 year ago
package.json versao 1 1 year ago

README.md

@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.