2.4.0 • Published 3 years ago

gatsby-plugin-goober v2.4.0

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

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.

2.4.0

3 years ago

2.3.0

3 years ago

2.3.1

3 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago