diff --git a/src/lib/viewers/controls/findbar/FindBarToggle.tsx b/src/lib/viewers/controls/findbar/FindBarToggle.tsx index 5d4536a1a..5092a2f29 100644 --- a/src/lib/viewers/controls/findbar/FindBarToggle.tsx +++ b/src/lib/viewers/controls/findbar/FindBarToggle.tsx @@ -3,10 +3,14 @@ import IconSearch18 from '../icons/IconSearch18'; import './FindBarToggle.scss'; export type Props = { - onFindBarToggle: () => void; + onFindBarToggle?: () => void; }; -export default function FindBarToggle({ onFindBarToggle }: Props): JSX.Element { +export default function FindBarToggle({ onFindBarToggle }: Props): JSX.Element | null { + if (!onFindBarToggle) { + return null; + } + return (