@linaria/babel-plugin-interop
TypeScript icon, indicating that this package has built-in type declarations

6.2.0 • Public • Published

Linaria

Zero-runtime CSS in JS library.


@linaria/babel-plugin-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 @linaria/babel-plugin-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 @linaria/babel-plugin-interop

Weekly Downloads

54

Version

6.2.0

License

MIT

Unpacked Size

18.5 kB

Total Files

8

Last publish

Collaborators

  • thymikee
  • satya164
  • zamotany
  • anber