mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 21:28:09 +08:00
cb25346d8c
* docs: enable prefetch for dumi Link * simplify link implementation * fix lint * remove nprogress dep --------- Co-authored-by: lijianan <574980606@qq.com>
17 lines
474 B
TypeScript
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;
|