|
|
|
|
@ -6,12 +6,21 @@ import Labels from "./Labels";
|
|
|
|
|
import { CallbackFunction } from "../../../types";
|
|
|
|
|
import { getInitialValues, tabs, validationSchema } from "./form-utils";
|
|
|
|
|
import { classNames } from "../../../utils/styles";
|
|
|
|
|
import { Button, styled } from "@mui/joy";
|
|
|
|
|
|
|
|
|
|
interface IEditNetworkModalProps {
|
|
|
|
|
onUpdateNetwork: CallbackFunction;
|
|
|
|
|
network: any;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Actions = styled("div")`
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: ${({ theme }) => theme.spacing(1)};
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const EditNetworkModal = (props: IEditNetworkModalProps) => {
|
|
|
|
|
const { onUpdateNetwork, network } = props;
|
|
|
|
|
const [openTab, setOpenTab] = useState("General");
|
|
|
|
|
@ -60,17 +69,11 @@ const EditNetworkModal = (props: IEditNetworkModalProps) => {
|
|
|
|
|
{openTab === "Labels" && <Labels />}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex justify-between items-center justify-end px-4 py-3 border-t border-solid border-blueGray-200 rounded-b">
|
|
|
|
|
<button
|
|
|
|
|
className="btn-util"
|
|
|
|
|
type="button"
|
|
|
|
|
onClick={() => {
|
|
|
|
|
formik.submitForm();
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Update
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<Actions>
|
|
|
|
|
<Button size="sm" variant="solid" onClick={formik.submitForm}>
|
|
|
|
|
Save
|
|
|
|
|
</Button>
|
|
|
|
|
</Actions>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</Formik>
|
|
|
|
|
|