From c603721ba5ea870288990f5877cd19127923527b Mon Sep 17 00:00:00 2001 From: Nishita Dash <cb.en.u4cse18037@cb.students.amrita.edu> Date: Wed, 24 Mar 2021 02:42:18 +0000 Subject: [PATCH] Upload New File --- digital-course-file/src/user/File.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 digital-course-file/src/user/File.js diff --git a/digital-course-file/src/user/File.js b/digital-course-file/src/user/File.js new file mode 100644 index 0000000..4a5ce33 --- /dev/null +++ b/digital-course-file/src/user/File.js @@ -0,0 +1,16 @@ +import { faFile } from "@fortawesome/free-solid-svg-icons" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" +import React from "react" + +export default function File({ file }) { + return ( + <a + href={file.url} + target="_blank" + className="btn btn-outline-dark text-truncate w-100" + > + <FontAwesomeIcon icon={faFile} className="mr-2" /> + {file.name} + </a> + ) +} \ No newline at end of file -- GitLab