fsubal / irontail

[experimental] TypeScript Language Service Plugin to make classNames() type-safe for Tailwind.css

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support JSX classname (without calling classNames())

fsubal opened this issue · comments

💡 Idea

// Currently supported
<div className={classNames('a', 'b')} />
<div className={classNames('a')} />

// Should be supported
<div className="a" />

// Out of scope
<div className="a b" />

It can interfere gradual adoption of tailwind ( For example, some part of codebase is written in tailwind, but others are not ).

Maybe it's better to enforce to always wrap with classNames(), if it is intended to be a tailwind classname ( That's more explicit ).