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

Template literals like className={twbg-green-${c}} #503

Open
rickyzhangca opened this issue Nov 26, 2023 · 0 comments
Open

Template literals like className={twbg-green-${c}} #503

rickyzhangca opened this issue Nov 26, 2023 · 0 comments

Comments

@rickyzhangca
Copy link

The following works with @twind/shim
image

      {[50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((c) => (
        <div key={c} className="flex items-center gap-1">
          <div
            className={`w-6 h-6 rounded-full bg-green-${c}`}
          ></div>
          <p>{c}</p>
        </div>
      ))}

but without shim how do we use template literal properly..?
image

      {[50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((c) => (
        <div key={c} className={tw`flex items-center gap-1`}>
          <div
            className={tw`w-6 h-6 rounded-full bg-green-${c}`}
          ></div>
          <p>{c}</p>
        </div>
      ))}
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

1 participant