diff --git a/packages/gestalt/src/BannerCallout.tsx b/packages/gestalt/src/BannerCallout.tsx index 100ef2a969..8194820b84 100644 --- a/packages/gestalt/src/BannerCallout.tsx +++ b/packages/gestalt/src/BannerCallout.tsx @@ -1,4 +1,4 @@ -import { Children, ComponentProps, ReactElement } from 'react'; +import { ComponentProps, ReactElement } from 'react'; import classnames from 'classnames'; import styles from './BannerCallout.css'; import VRBannerCallout from './BannerCallout/VRBannerCallout'; @@ -287,11 +287,7 @@ export default function BannerCallout({ {typeof message === 'string' && ( {message} )} - {typeof message !== 'string' && - // @ts-expect-error - TS2339 - Children.only(message).type.displayName === 'Text' - ? message - : null} + {message && typeof message !== 'string' && message}