diff --git a/src/Box.tsx b/src/Box.tsx index 02af9e1..b361337 100644 --- a/src/Box.tsx +++ b/src/Box.tsx @@ -2,10 +2,11 @@ import * as React from "react"; export type BoxOwnProps = { as?: E; + ref?: React.ComponentProps; }; export type BoxProps = BoxOwnProps & - Omit, keyof BoxOwnProps>; + Omit, keyof BoxOwnProps>; const defaultElement = "div"; @@ -13,7 +14,7 @@ export const Box: ( props: BoxProps, ) => React.ReactElement | null = React.forwardRef(function Box( props: BoxOwnProps, - ref: React.Ref, + ref, ) { const Element = props.as || defaultElement; return ;