disable peek overview for temporary issues until it is confirmed (#3749)
This commit is contained in:
parent
d73cd2ec9d
commit
62607ade6f
6 changed files with 11 additions and 2 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue