compiled
compiled copied to clipboard
Class names local variable usage results in being unable to statically extract value
found a edge case that isnt statically extracted
import { ClassNames } from '@compiled/react';
const ListItem = () => (
<ClassNames>
{({ css }) => {
const color = 'blue';
return <div className={css({ fontSize: '20px', color })}>hello, world!</div>;
// color ends up being a css variable
}}
</ClassNames>
);
Originally posted by @madou in https://github.com/atlassian-labs/compiled/pull/361#discussion_r526814407