mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
21 lines
370 B
JavaScript
21 lines
370 B
JavaScript
// @flow
|
|
import React from "react";
|
|
import type { File } from "@scm-manager/ui-types";
|
|
|
|
type Props = {
|
|
file: File
|
|
};
|
|
|
|
class FileIcon extends React.Component<Props> {
|
|
render() {
|
|
const { file } = this.props;
|
|
let icon = "file";
|
|
if (file.directory) {
|
|
icon = "folder";
|
|
}
|
|
return <i className={`fa fa-${icon}`} />;
|
|
}
|
|
}
|
|
|
|
export default FileIcon;
|