gatsby-plugin-goober

2.4.0 • Public • Published

gatsby-plugin-goober

A Gatsby plugin for 🥜goober with auto pragma config and built-in server-side rendering support.

Install

npm install --save goober gatsby-plugin-goober

How to use

Edit gatsby-config.js

module.exports = {
    plugins: [`gatsby-plugin-goober`]
};

And now you can create your components using goober

import React from 'react';
import { styled } from 'goober';

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

What does auto pragma config means?

goober needs to be instructed which pragma, eg JSX function, should be used to create the styled component. This is done via setup function and usually it's something that needs to be done inside the entry point or main file. For Gatsby that means gatsby-browser.js and gatsby-ssr.js which this plugin takes care of. So no need to worry about it, you simply use goober and everything is taken care of.

Package Sidebar

Install

npm i gatsby-plugin-goober

Weekly Downloads

0

Version

2.4.0

License

ISC

Unpacked Size

2.8 kB

Total Files

5

Last publish

Collaborators

  • cristianbote