elements: fix linkDownloadKp

This commit is contained in:
vchikalkin 2023-05-30 14:03:44 +03:00
parent c9523328da
commit f4acf8c316
2 changed files with 3 additions and 11 deletions

View File

@ -504,7 +504,7 @@ const props: Partial<ElementsProps> = {
width: '100%',
},
},
linkDownloadKp: { children: 'Скачать КП', icon: <DownloadOutlined />, target: '_blank' },
linkDownloadKp: { children: 'Скачать КП', icon: <DownloadOutlined /> },
tbxMileage: {
min: 0,
step: 100,

View File

@ -1,17 +1,9 @@
import type { ButtonProps } from 'antd';
import { Button as AntButton } from 'antd';
export function Link({ href, ...props }: ButtonProps) {
export function Link({ ...props }: ButtonProps) {
return (
<AntButton
rel="noopener"
target="_blank"
type="link"
onClick={() => {
window.open(href, '_blank')?.focus();
}}
{...props}
>
<AntButton rel="noopener" target="_blank" type="link" {...props}>
{props.children}
</AntButton>
);