Skip to content

Commit 5ad5a6c

Browse files
committed
Add shouldRender check in EducationalTooltip
1 parent da0805a commit 5ad5a6c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • src/components/Tooltip/EducationalTooltip

src/components/Tooltip/EducationalTooltip/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import type {TooltipExtendedProps} from '@components/Tooltip/types';
33
import BaseEducationalTooltip from './BaseEducationalTooltip';
44

55
function EducationalTooltip({children, ...props}: TooltipExtendedProps) {
6+
const {shouldRender} = props;
7+
8+
if (!shouldRender) {
9+
return children;
10+
}
11+
612
return (
713
<BaseEducationalTooltip
814
// eslint-disable-next-line react/jsx-props-no-spreading

0 commit comments

Comments
 (0)