mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 11:18:14 +08:00
7329c8a293
* site: fix a11y issue that <button> is nested inside <a> * Update .dumi/theme/common/LinkButton.tsx Co-authored-by: lijianan <574980606@qq.com> Signed-off-by: afc163 <afc163@gmail.com> --------- Signed-off-by: afc163 <afc163@gmail.com> Co-authored-by: lijianan <574980606@qq.com>
13 lines
402 B
TypeScript
13 lines
402 B
TypeScript
import React from 'react';
|
|
import { Button } from 'antd';
|
|
import type { ButtonProps } from 'antd';
|
|
import Link from './Link';
|
|
import type { LinkProps } from './Link';
|
|
|
|
type LinkButtonProps = LinkProps &
|
|
Readonly<React.PropsWithChildren<Pick<ButtonProps, 'type' | 'size'>>>;
|
|
|
|
const LinkButton: React.FC<LinkButtonProps> = (props) => <Link component={Button} {...props} />;
|
|
|
|
export default LinkButton;
|