Skip to content

compoundSlots broken with extend #199

@blowsie

Description

@blowsie

Describe the bug
When using extend on an object with compound slots, the classes are not applies

To Reproduce
Steps to reproduce the behavior:

const one = tv({
  slots: { base: 'bg-red w-full', child: 'rounded bg-blue-500' },
  compoundSlots: [
    {
      slots: ['base', 'child'],
      class: 'flex',
    },
  ],
})
const two = tv({
  extend: one,
  slots: {
    child: 'bg-green-500',
  },
})
console.log('[one][base]', one().base())
console.log('[one][child]', one().child())
console.log('[two][base]', two().base())
console.log('[two][child]', two().child())

Expected behavior
Expected result in green, actual result in red

  [one][base] bg-red w-full flex
  [one][child] rounded bg-blue-500 flex
- [two][base] bg-red w-full
+ [two][base] bg-red w-full flex
- [two][child] rounded bg-green-500
+ [two][child] rounded bg-green-500 flex

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions