UNPKG

@jbrowse/core

Version:

JBrowse 2 core libraries used by plugins

20 lines (19 loc) 899 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const material_1 = require("@mui/material"); const mobx_react_1 = require("mobx-react"); const types_1 = require("../../util/types"); const UrlChooser = (0, mobx_react_1.observer)(function ({ location, label, style, setLocation, }) { return ((0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", fullWidth: true, defaultValue: location && (0, types_1.isUriLocation)(location) ? location.uri : '', label: label || 'Enter URL', style: style, onChange: event => { setLocation({ uri: event.target.value.trim(), locationType: 'UriLocation', }); }, slotProps: { htmlInput: { 'data-testid': 'urlInput', }, } })); }); exports.default = UrlChooser;