Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Babel plugin for supporting interop between Linaria and Emotion/styled-components

License

Anber/linaria-interop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-linaria-interop

This plugin allows to interpolate Linaria components inside styled-components and Emotion:

import styled from 'styled-components';
import { Title } from './Title.styled'; // Linaria component

const Article = () => { /* … */ };

export default styled(Article)`
  & > ${Title} {
    color: green;
  }
`;

Quick start

Install the plugin first:

npm install --save-dev babel-plugin-linaria-interop

Then add linaria-interop to your babel configuration before styled-components:

{
  "plugins": [
    ["linaria-interop", { "library": "styled-components" }],
    "styled-components"
  ]
}

About

Babel plugin for supporting interop between Linaria and Emotion/styled-components

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published