-
Hey there! I'm trying to create a custom It works as-is, but as soon as I replace the native I did some investigation, and it looks like removing the I think this is a bug, but I wanted to create a discussion first in case this is known / I misconfigured something. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
If you spread the |
Beta Was this translation helpful? Give feedback.
-
I have the same problem with the Solution: // simplified example
type Badge = ComponentPropsWithoutRef<typeof Badge> // it's a `span` element with some custom properties
export const Badge = (props: BadgeProps) => {
return (
<Badge {...props}>
{children}
</Badge>
)
}
type HoverCardTriggerProps = ComponentPropsWithoutRef<typeof HoverCardRadix.Trigger>
export const HoverCardTrigger = ({ children, ...restProps }: HoverCardTriggerProps) => {
return (
<HoverCardRadix.Trigger asChild {...restProps}>
<Badge />
</HoverCardRadix.Trigger>
)
} |
Beta Was this translation helpful? Give feedback.
If you spread the
Button
props onto thebutton
, it will work https://codesandbox.io/s/reverent-bohr-xqrxpd?file=/App.js