taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
22 lines (21 loc) • 1.22 kB
JavaScript
import { jsxs as o, jsx as e } 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 s } from "./JBrowsePanel-uJIA-L6s.js";
const v = d()({
root: {
width: 500
}
}), D = m(function({ model: r, handleClose: a }) {
const { classes: n } = v(), { maxHeight: c = "" } = r, [t, l] = u(`${c}`), i = t !== "" && !Number.isNaN(+t);
return o(x.Dialog, { open: !0, onClose: a, title: "Set max height", children: [o(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, onChange: (h) => {
l(h.target.value);
}, placeholder: "Enter max score" }), i ? null : e("div", { style: { color: "red" }, children: "Invalid number" })] }), o(f, { children: [e(s, { variant: "contained", color: "primary", type: "submit", autoFocus: !0, disabled: !i, onClick: () => {
r.setMaxHeight(+t), a();
}, children: "Submit" }), e(s, { variant: "contained", color: "secondary", onClick: () => {
a();
}, children: "Cancel" })] })] });
});
export {
D as default
};
//# sourceMappingURL=SetMaxHeightDialog-B_fP6jOF.js.map