diff --git a/src/GameOptions/ui/GameOptionsPage.tsx b/src/GameOptions/ui/GameOptionsPage.tsx new file mode 100644 index 000000000..a8b5e4afa --- /dev/null +++ b/src/GameOptions/ui/GameOptionsPage.tsx @@ -0,0 +1,29 @@ +import { List, ListItem, Paper, Typography } from "@mui/material"; +import { uniqueId } from "lodash"; +import React from "react"; + +interface IProps { + children: React.ReactElement | (React.ReactElement | null)[]; + title: string; +} + +export const GameOptionsPage = (props: IProps): React.ReactElement => { + return ( + + {props.title} + {(props.children as any)?.length > 1 ? ( + + {(props.children as React.ReactElement[]) + .filter((c) => c) + .map((c, i) => ( + + {c} + + ))} + + ) : ( + props.children + )} + + ); +};