Skip to content

Commit e97306a

Browse files
committed
clean up + to-dos
1 parent 61ce097 commit e97306a

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

packages/gamut/src/Tip/shared/FloatingTip.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { CheckerDense } from '@codecademy/gamut-patterns';
2-
import { useLayoutEffect, useRef, useState } from 'react';
2+
import { useRef, useState } from 'react';
33
import * as React from 'react';
4-
import { useMeasure } from 'react-use';
54

65
import { Box } from '../../Box';
76
import { PreviewTipContents } from '../PreviewTip/elements';
@@ -89,7 +88,6 @@ export const FloatingTip: React.FC<TipWrapperProps> = ({
8988
) : (
9089
info
9190
);
92-
console.log(popoverAlignments);
9391

9492
return (
9593
<Box
@@ -118,7 +116,7 @@ export const FloatingTip: React.FC<TipWrapperProps> = ({
118116
{...popoverAlignments}
119117
animation="fade"
120118
dims={dims}
121-
isOpen={isOpen}
119+
isOpen={isHoverType ? isOpen : !isTipHidden}
122120
outline
123121
pattern={isPreviewType ? CheckerDense : undefined}
124122
skipFocusTrap

packages/gamut/src/Tip/shared/utils.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ export const getPopoverAlignment = ({
8282

8383
return popoverAlignment;
8484
};
85-
85+
/**
86+
*
87+
* to-do: add l/r center align vars here
88+
*
89+
*/
8690
export const createToolTipVariantFromAlignment = (alignment: string) => {
8791
let styleObject = {};
8892
let styleObjectAfter = {};

0 commit comments

Comments
 (0)