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

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i @linaria/babel-plugin-interop

    Weekly Downloads

    43

    Version

    6.2.0

    License

    MIT

    Unpacked Size

    18.5 kB

    Total Files

    8

    Last publish

    Collaborators

    • thymikee
    • satya164
    • zamotany
    • anber