[FEATURE] Migrated to new loading sequence (#6)
Co-authored-by: Dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.dev/elysium/minecluster/pulls/6
This commit is contained in:
parent
fb57c03ba7
commit
6eb4ed3e95
53 changed files with 1349 additions and 449 deletions
24
src/components/server-options/MemoryOption.jsx
Normal file
24
src/components/server-options/MemoryOption.jsx
Normal file
|
@ -0,0 +1,24 @@
|
|||
import TextField from "@mui/material/TextField";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
const maxMemSupported = 10;
|
||||
export const memoryOptions = new Array(2 * maxMemSupported)
|
||||
.fill(0)
|
||||
.map((v, i) => (i + 1) * 512);
|
||||
|
||||
export default function Option(props) {
|
||||
const { value, onChange } = props;
|
||||
return (
|
||||
<TextField
|
||||
label="Memory"
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
select
|
||||
required
|
||||
SelectProps={{ MenuProps: { sx: { maxHeight: "20rem" } } }}
|
||||
>
|
||||
{memoryOptions.map((o, i) => (
|
||||
<MenuItem value={o} key={i}>{`${o / 1024} Gi`}</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue