pugjs / babel-plugin-transform-react-pug

A plugin for transpiling pug templates to jsx
MIT License
810 stars 47 forks source link

How use component inside conditional rendering #108

Open cihanzenginff opened 5 years ago

cihanzenginff commented 5 years ago

Hello, i can't figure out how i can use component inside conditional rendering?

Btn(text=4<3 ? "SEND" : Loader)

here is i wan't to do eg: if 4<3 show string "SEND" else show Loader component

pruge commented 4 years ago
Btn(text=${ 4 < 3 ? 'SEND' : pug`Loader` })