0.0.2 • Published 2 years ago

style-to-string v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

style-to-string

This plugin transforms StyleObject to css string.

Example

In

import style from "style-to-string";
const css = style({ fontSize: 95 });

Out

const css = "font-size: 95px;";

In

import style from "style-to-string";
const value = "95px";
const css = style({ fontSize: value });

Out

const value = "95px";
const css = `font-size: ${value};`;

Installation

npm install --save-dev style-to-string

Usage

// .babelrc
{
  "plugins": ["style-to-string/babel"]
}
0.0.1

2 years ago

0.0.2

2 years ago

0.1.1

4 years ago

0.1.0

4 years ago