babel-plugin-jsx-wrap-if
v0.1.1
Published
Babel plugin for conditional wrapping
Downloads
998
Maintainers
Readme
babel-plugin-jsx-wrap-if
Conditional wrapping for React
Usage
In your babel.config.js file add:
plugins: [
...
'jsx-wrap-if'
]
In your JSX file:
<blockquote wrap-if={condition}>Wrapped text</blockquote>
When condition is false:
Wrapped text
When condition is true:
<blockquote>Wrapped text</blockquote>
License
MIT