mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
14dd498d08
* chore: issue attachment services added * feat: attachment icons added * chore: fetch-key and icons export * feat: issue attachment upload section added * feat: issue attachment list section added * feat: date helper function added * style: responsiveness added * feat: attachment info added * style: attachment overflow fix * style: cursor pointer added * chore: issue attachment interface * style: uploading state added * feat: delete issue attachment modal * style: style improvement and refactor * style: consistent icon added , chore: refactor the code * fix: js icon import fix * fix: build fix * chore: refactor code
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
import {
|
|
CssIcon,
|
|
CsvIcon,
|
|
DocIcon,
|
|
FigmaIcon,
|
|
HtmlIcon,
|
|
JavaScriptIcon,
|
|
JpgIcon,
|
|
PdfIcon,
|
|
PngIcon,
|
|
SheetIcon,
|
|
SvgIcon,
|
|
TxtIcon,
|
|
} from "components/icons";
|
|
|
|
export const getFileIcon = (fileType: string) => {
|
|
switch (fileType) {
|
|
case "pdf":
|
|
return <PdfIcon height={28} width={28} />;
|
|
case "csv":
|
|
return <CsvIcon height={28} width={28} />;
|
|
case "xlsx":
|
|
return <SheetIcon height={28} width={28} />;
|
|
case "css":
|
|
return <CssIcon height={28} width={28} />;
|
|
case "doc":
|
|
return <DocIcon height={28} width={28} />;
|
|
case "fig":
|
|
return <FigmaIcon height={28} width={28} />;
|
|
case "html":
|
|
return <HtmlIcon height={28} width={28} />;
|
|
case "png":
|
|
return <PngIcon height={28} width={28} />;
|
|
case "jpg":
|
|
return <JpgIcon height={28} width={28} />;
|
|
case "js":
|
|
return <JavaScriptIcon height={28} width={28} />;
|
|
case "txt":
|
|
return <TxtIcon height={28} width={28} />;
|
|
case "svg":
|
|
return <SvgIcon height={28} width={28} />;
|
|
|
|
default:
|
|
return <DocIcon height={28} width={28}/>;
|
|
}
|
|
};
|