19 lines
635 B
TypeScript
19 lines
635 B
TypeScript
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||
|
import React from 'react';
|
||
|
import { Button } from 'react-bootstrap';
|
||
|
import { getDownloadURL } from 'util/api';
|
||
|
import { FormattedMessage } from './localization';
|
||
|
|
||
|
export default function DownloadButton({ id, fileName }: { id: string, fileName: string }) {
|
||
|
return (
|
||
|
<Button variant="success" href={getDownloadURL(id, fileName)}>
|
||
|
<FontAwesomeIcon icon="download" className="mr-2" />
|
||
|
<FormattedMessage
|
||
|
id="DownloadButton.download"
|
||
|
defaultMessage="Download"
|
||
|
description="Text of the download button"
|
||
|
/>
|
||
|
</Button>
|
||
|
);
|
||
|
}
|