We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99ce873 commit 5e09f14Copy full SHA for 5e09f14
packages/components/src/Flex.tsx
@@ -1,4 +1,6 @@
1
import React from 'react'
2
+import { Theme } from '@theme-ui/core'
3
+
4
import { Box, BoxOwnProps, BoxProps } from './Box'
5
import { ForwardRef } from './types'
6
@@ -11,14 +13,14 @@ export type FlexProps = BoxProps
11
13
*/
12
14
export const Flex: ForwardRef<HTMLElement, FlexProps> = React.forwardRef(
15
function Flex(props: FlexProps, ref) {
- const { sx } = props;
16
+ const { sx } = props
17
return (
18
<Box
19
ref={ref}
20
{...props}
- sx={theme => ({
21
+ sx={(theme: Theme) => ({
22
display: 'flex',
- ...(typeof sx === "function" ? sx(theme) : sx),
23
+ ...(typeof sx === 'function' ? sx(theme) : sx),
24
})}
25
/>
26
)
0 commit comments