add download view

This commit is contained in:
Maren Süwer
2018-10-25 15:37:40 +02:00
parent 06d73f4ac8
commit 3f1f404456
5 changed files with 74 additions and 21 deletions

View File

@@ -0,0 +1,25 @@
//@flow
import React from "react";
import Button, { type ButtonProps } from "./Button";
import type {File} from "@scm-manager/ui-types";
type Props = {
displayName: string,
url: string
};
class DownloadButton extends React.Component<Props> {
render() {
const {displayName, url} = this.props;
return (
<a className="button is-large is-info" href={url}>
<span className="icon is-medium">
<i className="fas fa-arrow-circle-down" />
</span>
<span>{displayName}</span>
</a>
);
}
}
export default DownloadButton;

View File

@@ -7,4 +7,4 @@ export { default as DeleteButton } from "./DeleteButton.js";
export { default as EditButton } from "./EditButton.js";
export { default as RemoveEntryOfTableButton } from "./RemoveEntryOfTableButton.js";
export { default as SubmitButton } from "./SubmitButton.js";
export {default as DownloadButton} from "./DownloadButton.js";