Ensure that properties for patterns or style props are not renamed, as it prevents proper tracking.
📋 This rule is enabled in plugin:@pandacss/all
.
📋 This rule is enabled in plugin:@pandacss/recommended
.
❌ Examples of incorrect code:
import { css } from './panda/css';
function Text({ variant }){
return <p className={css({ textStyle: variant })} />;
};
import { css } from './panda/css';
function Text(props){
return <p className={css({ textStyle: props.variant })} />;
}
✔️ Examples of correct code:
import { css } from './panda/css';
function Text({ textStyle }){
return <p className={css({ textStyle })} />;
};
import { css } from './panda/css';
function Text(props){
return <p className={css({ textStyle: props.textStyle })} />;
};
import { Circle } from './panda/jsx';
function CustomCircle(props){
const { size = '3' } = props
return (
<Circle
size={size}
/>
)
};
import { Circle } from './panda/jsx';
function CustomCircle(props){
return (
<Circle
size={props.size}
/>
)
}