Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support className property for shim experience without the shim #7

Open
sastan opened this issue Mar 13, 2021 · 2 comments
Open

Support className property for shim experience without the shim #7

sastan opened this issue Mar 13, 2021 · 2 comments

Comments

@sastan
Copy link
Contributor

sastan commented Mar 13, 2021

<span className="font-bold">Blue</span>

Output

import { tw as _tw, directive as _directive } from 'twind'

<span className={_tw`font-bold`}>Blue</span>

References:

@itsMapleLeaf
Copy link
Contributor

I'm not really sold on this 🤔 className="..." is just tw="..." but longer, less capable, and with the potential of unwarranted side-effects. I think className should stay as-is for passing literal, unfiltered class names if ever needed

@sastan
Copy link
Contributor Author

sastan commented Mar 13, 2021

You are right. It is meant as an alternative shim (no runtime) that needs to be enabled explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants