Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Feb 14, 2025
2 parents ad62a0d + 5e09f14 commit 43cbbf5
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 124 deletions.
2 changes: 1 addition & 1 deletion examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@mdx-js/react": "^2.3.0",
"@next/mdx": "^14.0.4",
"@theme-ui/css": "workspace:^",
"next": "^14.0.4",
"next": "^15.1.2",
"react": "^18.1.0",
"react-dom": "^18",
"theme-ui": "workspace:^"
Expand Down
9 changes: 6 additions & 3 deletions packages/components/src/Flex.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react'
import { Theme } from '@theme-ui/core'

import { Box, BoxOwnProps, BoxProps } from './Box'
import { ForwardRef } from './types'

Expand All @@ -11,14 +13,15 @@ export type FlexProps = BoxProps
*/
export const Flex: ForwardRef<HTMLElement, FlexProps> = React.forwardRef(
function Flex(props: FlexProps, ref) {
const { sx } = props
return (
<Box
ref={ref}
{...props}
sx={{
sx={(theme: Theme) => ({
display: 'flex',
...props.sx,
}}
...(typeof sx === 'function' ? sx(theme) : sx),
})}
/>
)
}
Expand Down
Loading

0 comments on commit 43cbbf5

Please sign in to comment.