Skip to content

Gatsby plugin which wraps the vanilla-extract package for easy use

License

Notifications You must be signed in to change notification settings

mattcompiles/gatsby-plugin-vanilla-extract

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-plugin-vanilla-extract

Gatsby plugin which wraps the vanilla-extract project for easy use in Gatsby.

Setup

yarn add gatsby-plugin-vanilla-extract

Add to your site's gatsby-config.js.

module.exports = {
  plugins: [`gatsby-plugin-vanilla-extract`],
};

How to use

See the vanilla-extract README for full documentation.

Simple example.

src/pages/index.ts

import * as React from "react";

import { className } from "./index.css.ts";

export default function Index() {
  return <div className={className}>Pizza</div>;
}

src/pages/index.css.ts

import { style } from "@vanilla-extract/css";

export const className = style({
  background: "red",
});

About

Gatsby plugin which wraps the vanilla-extract package for easy use

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%