Socket
Book a DemoInstallSign in
Socket

babel-macro-goober

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-macro-goober

A babel macro for goober, rewriting styled.div to styled('div') calls

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

babel-macro-goober

A babel-plugin-macros macro for 🥜goober, rewriting styled.div syntax to styled('div') calls.

Install

npm install babel-macro-goober

You'll also need to install and configure babel-plugin-macros, if you haven't already.

Some toolkits like create-react-app already support babel-plugin-macros.

Usage

Once you've configured babel-plugin-macros, change your imports from goober to babel-macro-goober.

Now you can create your components using styled.* syntax:.

import { styled } from 'babel-macro-goober';

const Button = styled.button`
    margin: 0;
    padding: 1rem;
    font-size: 1rem;
    background-color: tomato;
`;

Note:

babel-plugin-transform-goober allows you to use the same syntax without changing the imports.

Keywords

babel-plugin-macros

FAQs

Package last updated on 26 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.