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