disable peek overview for temporary issues until it is confirmed (#3749)

This commit is contained in:
rahulramesha 2024-02-22 20:24:15 +05:30 committed by GitHub
parent d73cd2ec9d
commit 62607ade6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 2 deletions

View file

@ -5,10 +5,11 @@ export type TControlLink = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
onClick: () => void;
children: React.ReactNode;
target?: string;
disabled?: boolean;
};
export const ControlLink: React.FC<TControlLink> = (props) => {
const { href, onClick, children, target = "_self", ...rest } = props;
const { href, onClick, children, target = "_self", disabled = false, ...rest } = props;
const LEFT_CLICK_EVENT_CODE = 0;
const _onClick = (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
@ -19,6 +20,8 @@ export const ControlLink: React.FC<TControlLink> = (props) => {
}
};
if (disabled) return <>{children}</>;
return (
<a href={href} target={target} onClick={_onClick} {...rest}>
{children}