diff --git a/packages/react/src/components/HelpBubble/HelpBubble.tsx b/packages/react/src/components/HelpBubble/HelpBubble.tsx index 0e928d38c..d0c05d2df 100644 --- a/packages/react/src/components/HelpBubble/HelpBubble.tsx +++ b/packages/react/src/components/HelpBubble/HelpBubble.tsx @@ -14,20 +14,17 @@ const withStateProps = createWithStateProps([usePopoverContext]); export interface HelpBubbleRootProps extends HelpBubbleVariantProps, PopoverPrimitive.RootProps {} -export const HelpBubbleRoot = withRootProvider( - PopoverPrimitive.Root, - { - defaultProps: { - placement: "top", - gutter: 4, - overflowPadding: 16, - arrowPadding: 14, - flip: true, - slide: true, - strategy: "absolute", - }, +export const HelpBubbleRoot = withRootProvider(PopoverPrimitive.Root, { + defaultProps: { + placement: "top", + gutter: 4, + overflowPadding: 16, + arrowPadding: 14, + flip: true, + slide: true, + strategy: "absolute", }, -); +}); //////////////////////////////////////////////////////////////////////////////////// diff --git a/packages/react/src/utils/createStyleContext.tsx b/packages/react/src/utils/createStyleContext.tsx index 7902f3c4c..813525561 100644 --- a/packages/react/src/utils/createStyleContext.tsx +++ b/packages/react/src/utils/createStyleContext.tsx @@ -41,15 +41,15 @@ export function createStyleContext< return useContext(PropsContext); } - const withRootProvider = ( + const withRootProvider = ( Component: React.ElementType, options?: { defaultProps?: Partial

; }, - ): React.ForwardRefExoticComponent & React.RefAttributes> => { + ): React.ForwardRefExoticComponent> => { const { defaultProps } = options ?? {}; - const StyledComponent = forwardRef((innerProps, ref) => { + const StyledComponent = (innerProps: any) => { const props = { ...(defaultProps ?? {}), ...useProps(), ...innerProps } as Props & React.HTMLAttributes; const [variantProps, otherProps] = recipe.splitVariantProps(props); @@ -57,10 +57,10 @@ export function createStyleContext< return ( - + ); - }); + }; // @ts-ignore StyledComponent.displayName = Component.displayName || Component.name;