Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

smeijer/react-emotional

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-emotional

The styled API for emotion and react

react-emotional exports styled which allows you to use emotion to create React components that have styles attached to them, it also exports all of emotion's exports.

For more documentation on styled, read about it and try it out in the styled docs

npm install --save emotion react-emotional
// @live
import { injectGlobal, css } from 'react-emotional';

injectGlobal(`
  @mixin flex {
    display: flex;
    align-items: center;
  }
  
  :root {
    --blue: #3791f5;
  }
`);

const SomeComponent = css`
  @include flex;
  background-color: var(--blue);
`;


render(
  <SomeComponent />
)

About

react-emotion extended with some plugins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published