fela-react-helpers ·
API
withStyle
import React from 'react';import PropTypes from 'prop-types';import withStyle from 'fela-react-helpers'; const rule = color: propscolor backgroundColor: '#f00'; @/** * `react-styleguidist` will like these */Component static propTypes = /** prop types just work */ color: PropTypesstring ; static defaultProps = /** and default props too */ color: 'red' ; { const className children = thisprops; return <button =>children</button>; }
renderToPrettyString
Formats CSS from fela
renderer with js-beautify
.
; const renderer = ; // ...// Usually you will render a React component here// ... const styles = ;