rename Download component to Link

This commit is contained in:
Chika 2021-07-27 13:52:55 +03:00
parent 074acee933
commit 21f5b3cb50
2 changed files with 5 additions and 5 deletions

View File

@ -1,10 +1,10 @@
import ELT from 'client/Components/Calculation/ELT';
import Button from 'client/Elements/Button';
import Checkbox from 'client/Elements/Checkbox';
import Download from 'client/Elements/Download';
import Input from 'client/Elements/Input';
import InputNumber from 'client/Elements/InputNumber';
import Label from 'client/Elements/Label';
import Link from 'client/Elements/Link';
import Radio from 'client/Elements/Radio';
import Select from 'client/Elements/Select';
import Switch from 'client/Elements/Switch';
@ -156,7 +156,7 @@ const elementsComponents: TElements<Component> = {
labelResultBonusMPL: Label,
labelResultDopMPLLeasing: Label,
labelResultBonusDopProd: Label,
linkDownloadKp: Download,
linkDownloadKp: Link,
tbxMileage: InputNumber,
radioCalcType: Radio,
tbxTotalPayments: InputNumber,

View File

@ -1,7 +1,7 @@
import { Button as AntButton } from 'antd';
import { ElementStatus } from 'core/types/statuses';
const Download = ({ status, url, text, icon: Icon, ...props }) => {
const Link = ({ status, url, text, icon: Icon, ...props }) => {
return (
<AntButton
{...props}
@ -10,11 +10,11 @@ const Download = ({ status, url, text, icon: Icon, ...props }) => {
href={url}
disabled={status === ElementStatus.Disabled || !url}
loading={status === ElementStatus.Loading}
icon={<Icon />}
icon={Icon && <Icon />}
>
{text}
</AntButton>
);
};
export default Download;
export default Link;