19 lines
377 B
TypeScript
19 lines
377 B
TypeScript
import type { ButtonProps } from 'antd';
|
|
import { Button as AntButton } from 'antd';
|
|
|
|
export function Link({ href, ...props }: ButtonProps) {
|
|
return (
|
|
<AntButton
|
|
rel="noopener"
|
|
target="_blank"
|
|
type="link"
|
|
onClick={() => {
|
|
window.open(href, '_blank')?.focus();
|
|
}}
|
|
{...props}
|
|
>
|
|
{props.children}
|
|
</AntButton>
|
|
);
|
|
}
|