babel-plugin-linaria-interop

1.2.0 • Public • Published

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"
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-linaria-interop

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

155 kB

Total Files

8

Last publish

Collaborators

  • anber