Skip to content

Commit f6bbe65

Browse files
committed
refactor: Tooltip component always receives a wrapper from Controller
1 parent 649378c commit f6bbe65

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/Tooltip/Tooltip.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Tooltip = ({
1919
events = ['hover'],
2020
positionStrategy = 'absolute',
2121
middlewares,
22-
wrapper: WrapperElement = 'div',
22+
wrapper: WrapperElement,
2323
children = null,
2424
delayShow = 0,
2525
delayHide = 0,
@@ -38,7 +38,7 @@ const Tooltip = ({
3838
setIsOpen,
3939
}: ITooltip) => {
4040
const tooltipRef = useRef<HTMLElement>(null)
41-
const tooltipArrowRef = useRef<HTMLDivElement>(null)
41+
const tooltipArrowRef = useRef<HTMLElement>(null)
4242
const tooltipShowDelayTimerRef = useRef<NodeJS.Timeout | null>(null)
4343
const tooltipHideDelayTimerRef = useRef<NodeJS.Timeout | null>(null)
4444
const [inlineStyles, setInlineStyles] = useState({})

src/components/Tooltip/TooltipTypes.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface ITooltip {
4343
id?: string
4444
variant?: VariantType
4545
anchorId?: string
46-
wrapper?: WrapperType
46+
wrapper: WrapperType
4747
children?: ChildrenType
4848
events?: EventsType[]
4949
positionStrategy?: PositionStrategy

0 commit comments

Comments
 (0)