File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
- import { PropsWithChildren } from 'react' ;
2
1
import * as React from 'react' ;
3
2
import styled , { keyframes } from 'styled-components' ;
4
3
import { usePopper } from 'react-popper' ;
5
4
import { Placement } from '@popperjs/core/lib/enums' ;
6
5
import { variant } from 'styled-system' ;
6
+
7
+ import type { PropsWithChildren } from 'react' ;
8
+
7
9
import { MediaQueries , SemanticColors } from '../../essentials' ;
8
10
import { get } from '../../utils/themeGet' ;
9
11
import { Text } from '../Text/Text' ;
@@ -138,13 +140,13 @@ interface TooltipProps {
138
140
alwaysVisible ?: boolean ;
139
141
}
140
142
141
- const Tooltip : React . FC < TooltipProps > = ( {
143
+ const Tooltip : React . FC < PropsWithChildren < TooltipProps > > = ( {
142
144
content,
143
145
children,
144
146
placement = 'top' ,
145
147
alwaysVisible = false ,
146
148
inverted = false
147
- } : PropsWithChildren < TooltipProps > ) => {
149
+ } ) => {
148
150
const [ isVisible , setIsVisible ] = React . useState ( alwaysVisible ) ;
149
151
/**
150
152
* triggerReference and contentReference are used with the Popper library in order to get the tooltip styles and attributes
You can’t perform that action at this time.
0 commit comments