2022-05-18 21:54:29 +03:00

21 lines
580 B
TypeScript

import DownloadOutlined from '@ant-design/icons/lib/icons/DownloadOutlined';
import type { ButtonProps } from 'antd';
import { Button as AntButton } from 'antd';
import type { BaseElementProps } from './types';
export default function Link({ value, setValue, status, ...props }: BaseElementProps<string>) {
return (
<AntButton
rel="noopener"
target="_blank"
href={value}
disabled={status === 'Disabled'}
loading={status === 'Loading'}
icon={<DownloadOutlined />}
{...props}
/>
);
}
export type { ButtonProps as LinkProps };