File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed 
packages/pigment-css-react/src Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,11 @@ import * as React from 'react';
33import  clsx  from  'clsx' ; 
44import  isPropValid  from  '@emotion/is-prop-valid' ; 
55
6- function  getVariantClasses ( componentProps ,  variants )  { 
7-   const  {  ownerState =  { }  }  =  componentProps ; 
6+ function  getVariantClasses ( {  ownerState =  { } ,  ...componentProps  } ,  variants )  { 
87  const  variantClasses  =  variants 
98    . filter ( ( {  props : variantProps  } )  => 
109      typeof  variantProps  ===  'function' 
11-         ? variantProps ( {  ...componentProps ,  ...componentProps . ownerState  } ) 
10+         ? variantProps ( {  ...componentProps ,  ...ownerState ,   ownerState } ) 
1211        : Object . entries ( variantProps ) . every ( ( [ propKey ,  propValue ] )  =>  { 
1312            return  ownerState [ propKey ]  ===  propValue  ||  componentProps [ propKey ]  ===  propValue ; 
1413          } ) , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments