ant-design/.dumi/theme/common/Link.tsx
afc163 cb25346d8c
site: enable prefetch for dumi Link (#51921)
* docs: enable prefetch for dumi Link

* simplify link implementation

* fix lint

* remove nprogress dep

---------

Co-authored-by: lijianan <574980606@qq.com>
2024-12-06 13:40:58 +08:00

17 lines
474 B
TypeScript

import type { MouseEventHandler } from 'react';
import React from 'react';
import { Link as DumiLink } from 'dumi';
export interface LinkProps {
to: string | { pathname?: string; search?: string; hash?: string };
style?: React.CSSProperties;
className?: string;
onClick?: MouseEventHandler;
component?: React.ComponentType<any>;
children?: React.ReactNode;
}
const Link: React.FC<LinkProps> = (props) => <DumiLink {...props} prefetch />;
export default Link;