nextui-org / tailwind-variants

🦄 Tailwindcss first-class variant API
https://tailwind-variants.org
MIT License
2.42k stars 68 forks source link

compoundSlots unable to infer slots passed into 'extend' #140

Open binaryartifex opened 11 months ago

binaryartifex commented 11 months ago

Describe the bug As the title suggests, 'compoundSlots' is unable to infer slots passed into 'extend'

To Reproduce

export const baseStyles = tv({
  slots: {
    base: "bg-neutral-300",
  },
});

export const componentStyles = tv({
  extend: baseStyles,
  slots: {
    something: "text-neutral-800",
  },
  compoundSlots: [
    {
      slots: ["something","base"], // infers 'something', unable to infer 'base'
      className: "shadow-sm" 
    }
  ]
})

Expected behavior Able to infer extended slots without the need to provide empty placeholders

Desktop (please complete the following information):