From 0184eff59037e1308057d36dc1e2ce766ea44aae Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Sun, 3 Jan 2021 18:43:50 +0100 Subject: [PATCH] Parameterize download button icon. --- frontend/components/DownloadButton.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/components/DownloadButton.tsx b/frontend/components/DownloadButton.tsx index 409c424..241d29a 100644 --- a/frontend/components/DownloadButton.tsx +++ b/frontend/components/DownloadButton.tsx @@ -1,13 +1,22 @@ +import { IconProp } from '@fortawesome/fontawesome-svg-core'; 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 }) { +export default function DownloadButton({ + icon = 'download', + id, + fileName, +}: { + icon?: IconProp, + id: string, + fileName: string +}) { return (