// This file is part of Coog. The COPYRIGHT file at the top level of // this repository contains the full copyright notices and license terms. import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faFilePdf, faFilePowerpoint, faFileWord, faFileExcel, faFile, faFileImage, } from '@fortawesome/free-solid-svg-icons'; import { fileTypes } from './Card.types'; export interface iFileCard { fileCard?: boolean; fileType?: fileTypes; } const CardFile = ({ fileCard = false, fileType }: iFileCard): JSX.Element => { if (!fileCard) return <>; switch (fileType) { case 'pdf': return (
{fileType}
); case 'doc': case 'docx': case 'world': return (
{fileType}
); case 'xls': case 'xlsx': case 'excel': return (
{fileType}
); case 'ppt': case 'pptx': case 'powerpoint': return (
{fileType}
); case 'jpg': case 'png': case 'bmp': return (
{fileType}
); case 'txt': case 'odt': return (
{fileType}
); default: return (
); } }; export default CardFile;