Skip to content

Dynamic classes show type error #384

Answered by bstro
rohit8 asked this question in Q&A
Feb 28, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey there, you're close! What you're looking for is this:

import classnames, {TW} from 'tailwindcss-classnames'

const styles = classnames(
  TW.textColor({
    "text-gray-600": !isActive
  }),
  TW.display("flex"),
  …etc
)

Good luck!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@karltaylor
Comment options

@MaxJLerman
Comment options

Answer selected by rohit8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants