Skip to content

Commit ef5e134

Browse files
committed
fixed type issue
1 parent eb2fa2a commit ef5e134

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/primitives-core/src/styled.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export function createStyled(
5151

5252
// do we really want to use the same infra as the web since it only really uses theming?
5353
let Styled = React.forwardRef<unknown, StyledProps>((props, ref) => {
54-
const finalTag = (shouldUseAs && props.as) || component
54+
const finalTag =
55+
(shouldUseAs && (props.as as React.ElementType)) || component
5556

5657
let mergedProps = props
5758
if (props.theme == null) {

0 commit comments

Comments
 (0)