Skip to content

Allow selecting another slot in slotRecipe #1371

Closed Answered by segunadebayo
khanh-le-otsv asked this question in Q&A
Discussion options

You must be logged in to vote

I think this is a good use case for compound variants.

const buttonRecipe = defineSlotRecipe({
  className: 'button',
  slots: ['base', 'spinner'],
  variants: {
    sm: { }
  },
 compoundVariants: [
 {
   variant: ["sm"],
   css: {
       spinner: { 
          // ... overrides   
      }
   }
 }
 ]
});

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by anubra266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants