UNPKG

@jbrowse/core

Version:

JBrowse 2 core libraries used by plugins

16 lines (15 loc) 797 B
import { jsx as _jsx } from "react/jsx-runtime"; import LocalFileChooser from "./LocalFileChooser.js"; import UrlChooser from "./UrlChooser.js"; export default function LocationInput({ toggleButtonValue, selectedAccount, location, inline, setLocation, }) { if (selectedAccount?.SelectorComponent) { return (_jsx(selectedAccount.SelectorComponent, { setLocation: setLocation, selectedAccount: selectedAccount })); } if (toggleButtonValue === 'url') { return (_jsx(UrlChooser, { location: location, setLocation: setLocation, label: selectedAccount?.selectorLabel, style: inline ? { margin: 0 } : undefined })); } if (toggleButtonValue === 'file') { return _jsx(LocalFileChooser, { location: location, setLocation: setLocation }); } return null; }