Git Product home page Git Product logo

Comments (5)

Tarang74 avatar Tarang74 commented on July 30, 2024 1

@muhammadsammy That makes sense, thank you!

I was going to post another issue but I think it will be easier if I post here, how do I then import the utility functions? I don't want to use the CLI method (as shown in the README.md) because it builds a CSS file with all 24000 classes. When I do this:

import { alignItems, classnames } from 'tailwindcss-classnames'; 

It asks me whether I meant to do: TAlignItems. Is this the same?

How would I then use this type inside of the classnames function?

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on July 30, 2024 1

That was a bug that was just fixed in bc47da3
Please update to the latest version and the error will disappear

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on July 30, 2024

Hello!
The classnames function does not accept all classnames anymore in v3, but it will accept a utility function of classnames categories:

So the correct way of writing this would be:

	<div
        className={classnames(
            backgroundColor('bg-zinc-900')
        )}
    ></div>

More details:
https://github.com/muhammadsammy/tailwindcss-classnames#whats-new-in-v3
#293

from tailwindcss-classnames.

Tarang74 avatar Tarang74 commented on July 30, 2024

Thank you very much for clearing this up!

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on July 30, 2024

My pleasure

from tailwindcss-classnames.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.