UNPKG

@jbrowse/plugin-config

Version:

JBrowse 2 config utilities

20 lines (19 loc) 703 B
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime"; import { getType, isStateTreeNode } from '@jbrowse/mobx-state-tree'; import { observer } from 'mobx-react'; const HeadingComponent = observer(function HeadingComponent({ model, }) { const target = model?.target; if (target) { if (target.type) { return `${target.type} settings`; } if (isStateTreeNode(target)) { const type = getType(target); if (type.name) { return `${type.name.replace('ConfigurationSchema', '')} settings`; } } } return _jsx(_Fragment, { children: "Settings" }); }); export default HeadingComponent;