Skip to content

Commit 5e09f14

Browse files
committed
chore: fix types from accepted PR #2535
1 parent 99ce873 commit 5e09f14

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/components/src/Flex.tsx

+5-3
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,14 @@ export type FlexProps = BoxProps
1113
*/
1214
export const Flex: ForwardRef<HTMLElement, FlexProps> = React.forwardRef(
1315
function Flex(props: FlexProps, ref) {
14-
const { sx } = props;
16+
const { sx } = props
1517
return (
1618
<Box
1719
ref={ref}
1820
{...props}
19-
sx={theme => ({
21+
sx={(theme: Theme) => ({
2022
display: 'flex',
21-
...(typeof sx === "function" ? sx(theme) : sx),
23+
...(typeof sx === 'function' ? sx(theme) : sx),
2224
})}
2325
/>
2426
)

0 commit comments

Comments
 (0)