Add disabled flag to download button

This commit is contained in:
René Pfeuffer
2019-02-01 15:53:13 +01:00
parent c1e6ac98a8
commit e8666fa3e8

View File

@@ -3,14 +3,15 @@ import React from "react";
type Props = { type Props = {
displayName: string, displayName: string,
url: string url: string,
disabled: boolean
}; };
class DownloadButton extends React.Component<Props> { class DownloadButton extends React.Component<Props> {
render() { render() {
const { displayName, url } = this.props; const { displayName, url, disabled } = this.props;
return ( return (
<a className="button is-large is-link" href={url}> <a className="button is-large is-link" href={url} disabled={disabled}>
<span className="icon is-medium"> <span className="icon is-medium">
<i className="fas fa-arrow-circle-down" /> <i className="fas fa-arrow-circle-down" />
</span> </span>