-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
A className contained in a spread attribute is not taken into account by the Babel transform.
Reproduction
A new fixture has also been added.
function Component(props) {
return <p sx={{ color: 'green' }} {...props} />;
}Expected behavior
function Component(props) {
const sx = useStyling();
// When the `sx` prop is present, make sure that `className` comes last
return <p {...props} className={`${props.className || ''} ${sx(…)}`} />;
}Actual behavior
function Component(props) {
const sx = useStyling();
return (
<p
className={sx({
color: 'green',
})}
{...props}
/>
);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working