@difizen/mana-app
Version:
14 lines • 426 B
JavaScript
import { ViewInstance } from '@difizen/mana-core';
import { useInject } from '@difizen/mana-observable';
import { jsx as _jsx } from "react/jsx-runtime";
export function TreeNodeIcon(props) {
var fileTree = useInject(ViewInstance);
var node = props.node;
var icon = fileTree.toNodeIcon(node);
if (icon) {
return /*#__PURE__*/_jsx("div", {
className: "".concat(icon, " file-icon")
});
}
return null;
}