allow inputs to be rounded

This commit is contained in:
fmtabbara
2025-01-02 16:35:29 +00:00
committed by Yana
parent ef32b0e543
commit c76bc49abf
2 changed files with 12 additions and 1 deletions
+11 -1
View File
@@ -1,13 +1,16 @@
import { TextField } from "@mui/material";
import { type SxProps, TextField } from "@mui/material";
const Input = ({
placeholder,
fullWidth,
value,
rounded = false,
onChange,
}: {
placeholder?: string;
fullWidth?: boolean;
rounded?: boolean;
sx?: SxProps;
value: string;
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
}) => {
@@ -17,6 +20,13 @@ const Input = ({
fullWidth={fullWidth}
value={value}
onChange={onChange}
slotProps={{
input: {
sx: {
borderRadius: rounded ? 10 : 2,
},
},
}}
/>
);
};
@@ -73,6 +73,7 @@ const NodeAndAddressSearch = () => {
fullWidth
value={inputValue}
onChange={(e) => setInputValue(e.target.value)}
rounded
/>
<Button
variant="contained"