diff --git a/src/components/CustomizedTextField.tsx b/src/components/CustomizedTextField.tsx
new file mode 100644
index 00000000..ec134757
--- /dev/null
+++ b/src/components/CustomizedTextField.tsx
@@ -0,0 +1,53 @@
+import React from "react";
+import InputBase, { InputBaseProps } from "@mui/material/InputBase";
+import { FormControl, InputLabel, Theme, styled } from "@mui/material";
+import useId from "@mui/material/utils/useId";
+
+const StyledInput = styled(InputBase)(({ theme }: { theme: Theme }) => ({
+ "label + &": {
+ marginTop: theme.spacing(3)
+ },
+ "& .MuiInputBase-input": {
+ borderRadius: 2,
+ position: "relative",
+ border: "1px solid",
+ borderColor: theme.palette.secondary.main,
+ fontSize: "13px",
+ padding: "10px 12px",
+ "&:focus": {
+ borderColor: theme.palette.primary.main
+ },
+ "&.Mui-disabled": {
+ backgroundColor: theme.palette.secondary[100],
+ borderColor: theme.palette.secondary[100],
+ color: theme.palette.secondary[500],
+ "-webkit-text-fill-color": "unset"
+ }
+ }
+}));
+
+interface ICustomizedTextFieldProps extends InputBaseProps {
+ label: string;
+}
+
+export const CustomizedTextField = (props: ICustomizedTextFieldProps) => {
+ const id = useId();
+ const { label, fullWidth, ..._props } = props;
+ return (
+
+
+ {label}
+
+
+
+ );
+};
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 9233cf33..84450d18 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -5,3 +5,4 @@ export * from "./BlockContainerEditMode";
export * from "./Popup";
export * from "./icons";
export * from "./Dialog";
+export * from "./CustomizedTextField";
diff --git a/src/features/environmentDetails/components/EnvironmentDetailsHeader.tsx b/src/features/environmentDetails/components/EnvironmentDetailsHeader.tsx
index 45b0a748..90f76161 100644
--- a/src/features/environmentDetails/components/EnvironmentDetailsHeader.tsx
+++ b/src/features/environmentDetails/components/EnvironmentDetailsHeader.tsx
@@ -1,8 +1,8 @@
-import React from "react";
+import React, { ChangeEvent } from "react";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
-import TextField from "@mui/material/TextField";
import useTheme from "@mui/material/styles/useTheme";
+import { CustomizedTextField } from "../../../components";
import { StyledButtonPrimary } from "../../../styles";
import { useAppDispatch, useAppSelector } from "../../../hooks";
import {
@@ -70,39 +70,37 @@ export const EnvironmentDetailsHeader = ({
<>
{namespace && (
<>
-
>
)}
-
+ onUpdateName((e.target as HTMLInputElement).value)
+ }
inputProps={{
- style: {
- color: palette.common.black
+ sx: {
+ width: "35ch",
+ minWidth: "auto"
}
}}
- size="small"
- onChange={e => onUpdateName(e.target.value)}
/>
{/* Archive */}
>
diff --git a/src/features/metadata/components/Description.tsx b/src/features/metadata/components/Description.tsx
index 33649722..42caff96 100644
--- a/src/features/metadata/components/Description.tsx
+++ b/src/features/metadata/components/Description.tsx
@@ -1,9 +1,9 @@
import React from "react";
import Box from "@mui/material/Box";
-import TextField from "@mui/material/TextField";
import useTheme from "@mui/material/styles/useTheme";
import { StyledMetadataItem } from "../../../styles/StyledMetadataItem";
import { EnvironmentDetailsModes } from "../../../features/environmentDetails";
+import { CustomizedTextField } from "../../../components";
interface IDescriptionProps {
/**
@@ -22,39 +22,29 @@ export const Description = ({
const { palette } = useTheme();
return (
-
+
{mode === EnvironmentDetailsModes.READ && description && (
{description}
)}
{mode !== EnvironmentDetailsModes.READ && (
- <>
-
- Description:
-
-
- onChangeDescription(e.target.value)}
- />
-
- >
+ onChangeDescription(e.target.value)}
+ />
)}
);