mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
22 lines
422 B
TypeScript
22 lines
422 B
TypeScript
import React from 'react';
|
|
import { 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.subRepository) {
|
|
icon = 'folder-plus';
|
|
} else if (file.directory) {
|
|
icon = 'folder';
|
|
}
|
|
return <i className={`fa fa-${icon}`} />;
|
|
}
|
|
}
|
|
|
|
export default FileIcon;
|