import { SpaceBar } from "@mui/icons-material"; import { FormControl, MenuItem, Select } from "@mui/material"; import { SelectInputProps } from "@mui/material/Select/SelectInput"; import { css } from "@mui/material/styles"; import { memo } from "react"; import { Configurations } from "@/components/common"; const spacesArray = [2, 4] as const; export type Spaces = typeof spacesArray[number]; export const isSpaces = (x: number): x is Spaces => spacesArray.includes(x as Spaces); type OnSelectChange = NonNullable["onChange"]>; type Props = { spaces: Spaces; onSpacesChange: OnSelectChange; }; const select = css` & .MuiSelect-select:focus { background-color: transparent; } `; const StyledComponent = ({ spaces, onSpacesChange }: Props) => ( , title: "Indentation", input: ( ), }, ]} /> ); export const Component = memo(StyledComponent); export default Component;