-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Tooltip/Popover children type (#26534)
close #26517
- Loading branch information
Showing
3 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from 'react'; | ||
import Tooltip from '..'; | ||
|
||
describe('Tooltip.typescript', () => { | ||
it('Tooltip children should accept ReactNode', () => { | ||
const tooltip = ( | ||
<Tooltip title="title"> | ||
<div /> | ||
<div /> | ||
</Tooltip> | ||
); | ||
const tooltip2 = <Tooltip title="title">{null}</Tooltip>; | ||
expect(tooltip).toBeTruthy(); | ||
expect(tooltip2).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters