softwarecrafts / tailwind-component-classes

Create CSS classes without leaving your tailwind config
8 stars 1 forks source link

Allow config in theme{} object #13

Closed silveltman closed 1 year ago

silveltman commented 1 year ago

Cool plugin!

I think it would be awesome if the buttons could be create inside the theme{ extend:{} } object, instead of in a separate components{} object. SP like this:

theme: {
   extend: {
     components: {
     ...
  }
}

This would allow is to apply themes to the components, with this awesome themer plugin: https://github.com/RyanClementsHax/tailwindcss-themer

So we could have the components automatically switch themes for dark-mode for example.

Would be very very very cool, since it's precisely what I need atm :)

silveltman commented 1 year ago

Sorry, this is not true. For this to make sense this plugin should work like this:

components: { btn: { backgroundColor: ..., color: ..., ... } }

If if you know of any plugins that allow this inside the extend{} object, kindly let me know :)