#Custom Component Tooltip

2 messages · Page 1 of 1 (latest)

thorn arch
wintry belfry
#

The custom component needs to spread props to the underlying element containing a ref.

const MyBadge = forwardRef(({ color, ...props }, ref) => (
  <div ref={ref} color={color} {...props}>
    Badge
  </div>
));