A Babel plugin for filbert, converts styled.div
syntax to styled('div')
calls.
npm install --save babel-plugin-filbert
Edit .babelrc.json
1{2 "presets": [...],3 "plugins": ["babel-plugin-filbert"]4}
And now you can create your components using styled.*
syntax:
1import React from 'react';2import { styled } from 'filbert';34const Button = styled.button`5 margin: 0;6 padding: 1rem;7 font-size: 1rem;8 background-color: tomato;9`;