Skip to content
New issue

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

Handle derived sx in Flex.tsx #2535

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/components/src/Flex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
*/
export const Flex: ForwardRef<HTMLElement, FlexProps> = React.forwardRef(
function Flex(props: FlexProps, ref) {
const { sx } = props;
return (
<Box
ref={ref}
{...props}
sx={{
sx={theme => ({

Check failure on line 19 in packages/components/src/Flex.tsx

View workflow job for this annotation

GitHub Actions / build

Parameter 'theme' implicitly has an 'any' type.
display: 'flex',
...props.sx,
}}
...(typeof sx === "function" ? sx(theme) : sx),
})}
/>
)
}
Expand Down
Loading