FrontPastel/node_modules/@emotion/react
NataliaCancinoV aa2823eee5 Primer commit 2024-04-17 07:55:11 -06:00
..
_isolated-hnrs Primer commit 2024-04-17 07:55:11 -06:00
dist Primer commit 2024-04-17 07:55:11 -06:00
jsx-dev-runtime Primer commit 2024-04-17 07:55:11 -06:00
jsx-runtime Primer commit 2024-04-17 07:55:11 -06:00
src Primer commit 2024-04-17 07:55:11 -06:00
types Primer commit 2024-04-17 07:55:11 -06:00
LICENSE Primer commit 2024-04-17 07:55:11 -06:00
README.md Primer commit 2024-04-17 07:55:11 -06:00
macro.d.mts Primer commit 2024-04-17 07:55:11 -06:00
macro.d.ts Primer commit 2024-04-17 07:55:11 -06:00
macro.js Primer commit 2024-04-17 07:55:11 -06:00
macro.js.flow Primer commit 2024-04-17 07:55:11 -06:00
package.json Primer commit 2024-04-17 07:55:11 -06:00

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.