Skip to content

Commit 43cbbf5

Browse files
committed
Merge branch 'develop' into stable
2 parents ad62a0d + 5e09f14 commit 43cbbf5

File tree

3 files changed

+352
-124
lines changed

3 files changed

+352
-124
lines changed

examples/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@mdx-js/react": "^2.3.0",
1818
"@next/mdx": "^14.0.4",
1919
"@theme-ui/css": "workspace:^",
20-
"next": "^14.0.4",
20+
"next": "^15.1.2",
2121
"react": "^18.1.0",
2222
"react-dom": "^18",
2323
"theme-ui": "workspace:^"

packages/components/src/Flex.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React from 'react'
2+
import { Theme } from '@theme-ui/core'
3+
24
import { Box, BoxOwnProps, BoxProps } from './Box'
35
import { ForwardRef } from './types'
46

@@ -11,14 +13,15 @@ export type FlexProps = BoxProps
1113
*/
1214
export const Flex: ForwardRef<HTMLElement, FlexProps> = React.forwardRef(
1315
function Flex(props: FlexProps, ref) {
16+
const { sx } = props
1417
return (
1518
<Box
1619
ref={ref}
1720
{...props}
18-
sx={{
21+
sx={(theme: Theme) => ({
1922
display: 'flex',
20-
...props.sx,
21-
}}
23+
...(typeof sx === 'function' ? sx(theme) : sx),
24+
})}
2225
/>
2326
)
2427
}

0 commit comments

Comments
 (0)