pugjs / babel-plugin-transform-react-pug

A plugin for transpiling pug templates to jsx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use conditional className ?

cihanzenginff opened this issue · comments

Hello, i worried how assign conditional classNames with your plugin?

i tried:

Input(className=this.state.val ? "active" : null)

but not worked

@cihanzenginff your example should work fine:

https://react.pugjs.org/repl#%7B%22code%22:%22cHVnYAogIElucHV0KGNsYXNzTmFtZT10aGlzLnN0YXRlLnZhbCA/ICJhY3RpdmUiIDogbnVsbCkKYA==%22%7D

I see that you closed the issue, but if there is any question left, please, let me know ;)