// Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { ReactNode } from 'react'; import React, { useCallback } from 'react'; const BASE_CLASS_NAME = 'LeftPaneBanner'; export type PropsType = Readonly<{ children?: ReactNode; actionText: string; onClick: () => void; }>; export function LeftPaneBanner({ children, actionText, onClick, }: PropsType): JSX.Element { const onClickWrap = useCallback( (e: React.MouseEvent) => { e.preventDefault(); e.stopPropagation(); onClick?.(); }, [onClick] ); return (
{children}
); }