File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3108,6 +3108,10 @@ export interface TooltipProps {
3108
3108
* The appearance of the Tooltip.
3109
3109
*/
3110
3110
appearance ?: TooltipAppearance
3111
+ /**
3112
+ * The id of the tooltip.
3113
+ */
3114
+ id ?: string
3111
3115
/**
3112
3116
* The position the Tooltip is on.
3113
3117
*/
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const Tooltip = memo(function Tooltip(props) {
22
22
statelessProps = emptyProps
23
23
} = props
24
24
25
- const id = useId ( 'evergreen-tooltip' )
25
+ const id = useId ( 'evergreen-tooltip' , props . id )
26
26
const [ isShown , setIsShown ] = useState ( propIsShown || false )
27
27
const [ isShownByTarget , setIsShownByTarget ] = useState ( false )
28
28
const closeTimer = useRef ( undefined )
@@ -153,6 +153,11 @@ Tooltip.propTypes = {
153
153
*/
154
154
appearance : PropTypes . oneOf ( [ 'default' , 'card' ] ) ,
155
155
156
+ /**
157
+ * The id of the tooltip.
158
+ */
159
+ id : PropTypes . string ,
160
+
156
161
/**
157
162
* The position the Popover is on.
158
163
*/
You can’t perform that action at this time.
0 commit comments