UNPKG

taxonium-component

Version:

React component for exploring large phylogenetic trees in the browser

22 lines (21 loc) 1.17 kB
import { jsx as e, jsxs as s } from "react/jsx-runtime"; import { useState as u } from "react"; import { o as m, m as d, a as x, D as g, T as p, c as y, d as f, B as r } from "./JBrowsePanel-uJIA-L6s.js"; const C = d()({ root: { width: 500 } }), b = m(function(i) { const { model: o, handleClose: a } = i, { classes: n } = C(), { maxHeight: l = "" } = o, [t, c] = u(`${l}`); return e(x.Dialog, { open: !0, onClose: a, title: "Set max height", children: s(g, { className: n.root, children: [e(p, { children: 'Set max height for the track. For example, you can increase this if the layout says "Max height reached"' }), e(y, { value: t, autoFocus: !0, onChange: (h) => { c(h.target.value); }, placeholder: "Enter max height for layout" }), s(f, { children: [e(r, { variant: "contained", color: "primary", type: "submit", autoFocus: !0, onClick: () => { o.setMaxHeight(t !== "" && !Number.isNaN(+t) ? +t : void 0), a(); }, children: "Submit" }), e(r, { variant: "contained", color: "secondary", onClick: () => { a(); }, children: "Cancel" })] })] }) }); }); export { b as default }; //# sourceMappingURL=SetMaxHeightDialog-BK9fK15U.js.map