Skip to content

Commit 78cb7b3

Browse files
committed
move prop destructuring to args in Tooltip
1 parent 63a59a7 commit 78cb7b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Tooltip/Tooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ export function Tooltip<
4343
FCProps extends React.PropsWithChildren<object> = DefaultTooltipProps,
4444
>({
4545
position = DEFAULT_POSITION,
46+
wrapperclasses,
47+
className,
4648
...props
4749
}: DefaultTooltipProps | CustomTooltipProps<FCProps>): ReactElement {
4850
const triggerElementRef = useRef<HTMLElement & HTMLButtonElement>(null)
@@ -60,8 +62,6 @@ export function Tooltip<
6062
const [wrapTooltip, setWrapTooltip] = useState(false)
6163
const [positionStyles, setPositionStyles] = useState({})
6264

63-
const { wrapperclasses, className } = props
64-
6565
const positionTop = (e: HTMLElement, triggerEl: HTMLElement): void => {
6666
const topMargin = calculateMarginOffset('top', e.offsetHeight, triggerEl)
6767
const leftMargin = calculateMarginOffset('left', e.offsetWidth, triggerEl)

0 commit comments

Comments
 (0)