File tree Expand file tree Collapse file tree
packages/gamut/src/Tip/shared Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { CheckerDense } from '@codecademy/gamut-patterns' ;
2- import { useLayoutEffect , useRef , useState } from 'react' ;
2+ import { useRef , useState } from 'react' ;
33import * as React from 'react' ;
4- import { useMeasure } from 'react-use' ;
54
65import { Box } from '../../Box' ;
76import { 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
Original file line number Diff line number Diff 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+ */
8690export const createToolTipVariantFromAlignment = ( alignment : string ) => {
8791 let styleObject = { } ;
8892 let styleObjectAfter = { } ;
You can’t perform that action at this time.
0 commit comments