We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A framework like Next.js transpile the code from ArrowFunction to FunctionDeclaration that developers don't have control:
ArrowFunction
FunctionDeclaration
⨯ unhandledRejection: SyntaxError: /Users/siriwatknp/practice-repos/nextjs-tailwind-v4/src/app/landing-page/components/Features.tsx: @pigment-css/react: sx prop only supports arrow functions directly returning an object, for example () => ({color: 'red'}). You can accept theme object in the params if required. 171 | children: [ 172 | /*#__PURE__*/ _jsxDEV(Box, { > 173 | sx: (param)=>{ | ^ 174 | let { theme } = param; 175 | return { 176 | backgroundSize: "cover",
The original code is:
<Box sx={({ theme }) => ({ backgroundSize: 'cover', backgroundPosition: 'center', minHeight: 280, backgroundImage: 'var(--Image-light)', ...theme.applyStyles('dark', { backgroundImage: 'var(--Image-dark)', }), })}
The sx prop should work with function declaration too.
sx
No response
Search keywords: sx function declaration
The text was updated successfully, but these errors were encountered:
I don't think we need this since #50
Sorry, something went wrong.
No branches or pull requests
Summary
A framework like Next.js transpile the code from
ArrowFunction
toFunctionDeclaration
that developers don't have control:The original code is:
The
sx
prop should work with function declaration too.Examples
No response
Motivation
No response
Search keywords: sx function declaration
The text was updated successfully, but these errors were encountered: