Git Product home page Git Product logo

Comments (10)

muhammadsammy avatar muhammadsammy commented on June 11, 2024 2

Reproduce step: (v1.3.1)

  • add custom variant in tailwind.config.js
    variants: { borderWidth: ['hover'], },
  • generate new types:
    tailwindcss-classnames --config tailwind.config.js -o ./src/tailwindcss-classnames.ts

Expected:

All tailwind default TPseudoClasses with extended variants

Actually happening

Only get type for custom variants:
export type TPseudoClasses = | 'hover:border' | 'hover:border-0' ...

Fixed in 423d5ba šŸ‘

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on June 11, 2024 1

The "@tailwindcss/plugin" which I use here is just a plugin with custom classes and its not "https://tailwindui.com/. (Maybe it's a part of tailwindui).
https://www.npmjs.com/package/@tailwindcss/ui

I would like to add support for First party plugins.
This is what I mean, we can have the types for tw 3rd-party plugin. https://github.com/aniftyco/awesome-tailwindcss#plugins

The postcss-ts-classnames project does exactly this. you will need to add the generated types from postcss-ts-classnames to the this package's exported classnames function.
Maybe will add a feature to the tailwindcss-classnames CLI that does this automatically.

from tailwindcss-classnames.

sondh0127 avatar sondh0127 commented on June 11, 2024

I will keep more update some more missing type here. Thanks for the library. Great work!

from tailwindcss-classnames.

sondh0127 avatar sondh0127 commented on June 11, 2024

Missing type default tailwind type

  • export type TJustifyContent = ...
    | 'justify-evenly'
  • export type TTransforms = 'transform' | TScale | ...

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on June 11, 2024

P/S: Request feature: Generate type for custom plugin

`plugins: [require('@tailwindcss/ui')]

Hi there!
Sure, I would like to add support for First party plugins, but as far as I know, TailwindUI is just components built with regular TailwindCSS classes. Does it have custom classes? I did not purchase an early access to TailwindUI so I do not know!

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on June 11, 2024

Missing type default tailwind type

  • export type TJustifyContent = ...
    | 'justify-evenly'
  • export type TTransforms = 'transform' | TScale | ...

I did not find this class in tailwindcss' docs. Can you send me a link to it?

from tailwindcss-classnames.

sondh0127 avatar sondh0127 commented on June 11, 2024

P/S: Request feature: Generate type for custom plugin

`plugins: [require('@tailwindcss/ui')]

Hi there!
Sure, I would like to add support for First party plugins, but as far as I know, TailwindUI is just components built with regular TailwindCSS classes. Does it have custom classes? I did not purchase an early access to TailwindUI so I do not know!

The "@tailwindcss/plugin" which I use here is just a plugin with custom classes and its not "https://tailwindui.com/. (Maybe it's a part of tailwindui).
https://www.npmjs.com/package/@tailwindcss/ui

I would like to add support for First party plugins.
This is what I mean, we can have the types for tw 3rd-party plugin. https://github.com/aniftyco/awesome-tailwindcss#plugins

from tailwindcss-classnames.

sondh0127 avatar sondh0127 commented on June 11, 2024

Missing type default tailwind type

  • export type TJustifyContent = ...
    | 'justify-evenly'
  • export type TTransforms = 'transform' | TScale | ...

I did not find this class in tailwindcss' docs. Can you send me a link to it?

Sure
missing one 'justify-evenly'
require 'transform' for any transformation

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on June 11, 2024

Sure
missing one 'justify-evenly'
require 'transform' for any transformation

Fixed both in v1.3.4
The class justify-evenly is missing from the docs but it has been added to tailwindcss classes.

from tailwindcss-classnames.

muhammadsammy avatar muhammadsammy commented on June 11, 2024

Iā€™m closing this issue due to inactivity. Please reopen if you have any questions!

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.