File tree Expand file tree Collapse file tree 3 files changed +352
-124
lines changed
Expand file tree Collapse file tree 3 files changed +352
-124
lines changed Original file line number Diff line number Diff line change 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:^"
Original file line number Diff line number Diff line change 11import React from 'react'
2+ import { Theme } from '@theme-ui/core'
3+
24import { Box , BoxOwnProps , BoxProps } from './Box'
35import { ForwardRef } from './types'
46
@@ -11,14 +13,15 @@ export type FlexProps = BoxProps
1113 */
1214export 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 }
You can’t perform that action at this time.
0 commit comments