mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
implemented ui for sources root
This commit is contained in:
20
scm-ui/src/repos/sources/components/FileIcon.js
Normal file
20
scm-ui/src/repos/sources/components/FileIcon.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// @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;
|
||||
Reference in New Issue
Block a user