taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
22 lines (21 loc) • 1.46 kB
JavaScript
import { jsx as e, jsxs as r } from "react/jsx-runtime";
import { useState as s } from "react";
import { o as m, a as f, D as S, T as b, c as C, d as y, B as c } from "./JBrowsePanel-uJIA-L6s.js";
import { F as v } from "./FormControlLabel-CwjOxa71.js";
import { C as N } from "./Checkbox-BG4jcGUl.js";
const T = m(function(h) {
const { model: o, handleClose: a } = h, { featureHeightSetting: l, noSpacing: g } = o, [t, u] = s(`${l}`), [i, d] = s(g), p = t !== "" && !Number.isNaN(+t);
return e(f.Dialog, { open: !0, onClose: a, title: "Set feature height", children: r(S, { children: [e(b, { children: "Adjust the feature height and whether there is any spacing between features. Setting feature height to 1 and removing spacing makes the display very compact." }), e(C, { value: t, helperText: "Feature height", onChange: (n) => {
u(n.target.value);
} }), e(v, { control: e(N, { checked: !!i, onChange: () => {
d((n) => !n);
} }), label: "Remove spacing between features in y-direction?" }), r(y, { children: [e(c, { variant: "contained", color: "primary", type: "submit", autoFocus: !0, disabled: !p, onClick: () => {
o.setFeatureHeight(t !== "" && !Number.isNaN(+t) ? +t : void 0), o.setNoSpacing(i), a();
}, children: "Submit" }), e(c, { variant: "contained", color: "secondary", onClick: () => {
a();
}, children: "Cancel" })] })] }) });
});
export {
T as default
};
//# sourceMappingURL=SetFeatureHeightDialog-Dfy7SfzS.js.map