babel-plugin-filbert
Version:
babel plugin for filbert-js
33 lines (23 loc) • 572 B
Markdown
# babel-plugin-filbert
A [Babel](https://babeljs.io/) plugin for filbert, converts `styled.div` syntax to `styled('div')` calls.
## Install
`npm install --save babel-plugin-filbert`
## How to use
Edit `.babelrc.json`
```js editor=static
{
"presets": [...],
"plugins": ["babel-plugin-filbert"]
}
```
And now you can create your components using `styled.*` syntax:
```jsx editor=static
import React from 'react';
import { styled } from 'filbert';
const Button = styled.button`
margin: 0;
padding: 1rem;
font-size: 1rem;
background-color: tomato;
`;
```