allow inputs to be rounded
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user