Skip to content

Commit

Permalink
Merge pull request #32 from Exabyte-io/chore/SOF-6955-1
Browse files Browse the repository at this point in the history
chore/SOF-6955
  • Loading branch information
timurbazhirov authored Sep 20, 2023
2 parents 81c4e65 + f8fdf1a commit 259ba33
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/mui/components/select/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable react/jsx-props-no-spreading */
import Box from "@mui/material/Box";
import Chip from "@mui/material/Chip";
import FormControl from "@mui/material/FormControl";
import FormControl, { FormControlProps } from "@mui/material/FormControl";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import Select, { SelectChangeEvent } from "@mui/material/Select";
Expand All @@ -20,6 +21,7 @@ export interface SelectProps {
isChips?: boolean;
onDelete?: (event: string) => void;
getChipLabel?: (value: string) => string;
formControlProps: FormControlProps;
}
export default function SelectComponent({
id,
Expand All @@ -33,6 +35,7 @@ export default function SelectComponent({
sx = {},
fontSize = 16,
getChipLabel = (value) => value,
formControlProps = {},
}: SelectProps) {
const renderValue = isChips
? (selected: string[]) => (
Expand All @@ -59,7 +62,7 @@ export default function SelectComponent({
: undefined;

return (
<FormControl sx={{ marginY: 1, width: "100%" }}>
<FormControl sx={{ marginY: 1, width: "100%" }} {...formControlProps}>
{label ? (
<InputLabel id={`${id}-label`} sx={{ fontSize }}>
{label}
Expand Down

0 comments on commit 259ba33

Please sign in to comment.