Skip to content

Commit

Permalink
Fixed unresolved & unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMusgrave committed Jan 6, 2020
1 parent ac3c1fa commit 6b6a332
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import React, {
memo,
useEffect,
useState,
useRef,
RefObject,
useCallback,
} from 'react';
import {createUniqueIDFactory} from '@shopify/javascript-utilities/other';
import React, {useEffect, useState, useRef, useCallback} from 'react';
import {findFirstFocusableNode} from '@shopify/javascript-utilities/focus';

import {PreferredPosition} from '../PositionedOverlay';
import {Portal} from '../Portal';
import {useUniqueId} from '../../utilities/unique-id';
import {useFocused} from '../../utilities/use-focused';
import {useToggle} from '../../utilities/use-toggle';
import {TooltipOverlay} from './components';
import styles from './Tooltip.scss';

Expand Down Expand Up @@ -46,7 +38,7 @@ export function Tooltip({
activatorWrapper = 'span',
}: TooltipProps) {
const WrapperComponent: any = activatorWrapper;
const [active, {handleFocus, handleBlur}] = useFocused(
const {value: active, setTrue: handleFocus, setFalse: handleBlur} = useToggle(
Boolean(originalActive),
);
const [activatorNode, setActivatorNode] = useState<HTMLElement | null>(null);
Expand Down

0 comments on commit 6b6a332

Please sign in to comment.