From 3b1f41e59460d86488282c0a95802d5f4a46757f Mon Sep 17 00:00:00 2001 From: petar-cvit Date: Mon, 23 Sep 2024 22:09:58 +0200 Subject: [PATCH] advanced module section --- .../components/pages/NewModule/NewModule.tsx | 83 ++++++++++++------- .../src/components/pages/NewModule/custom.css | 17 ++++ 2 files changed, 72 insertions(+), 28 deletions(-) diff --git a/cyclops-ui/src/components/pages/NewModule/NewModule.tsx b/cyclops-ui/src/components/pages/NewModule/NewModule.tsx index 8f8e38e1..48b0fa14 100644 --- a/cyclops-ui/src/components/pages/NewModule/NewModule.tsx +++ b/cyclops-ui/src/components/pages/NewModule/NewModule.tsx @@ -31,6 +31,7 @@ import { } from "../../errors/FormValidationErrors"; import { mapResponseError } from "../../../utils/api/errors"; import TemplateFormFields from "../../form/TemplateFormFields"; +import { DownOutlined, UpOutlined } from "@ant-design/icons"; const { Title } = Typography; const layout = { @@ -101,6 +102,8 @@ const NewModule = () => { }); }; + const [advancedOptionsExpanded, setAdvancedOptionsExpanded] = useState(false); + const [form] = Form.useForm(); useEffect(() => { @@ -474,6 +477,10 @@ const NewModule = () => { openNotification(errorMessages); }; + const toggleExpand = () => { + setAdvancedOptionsExpanded(!advancedOptionsExpanded); + }; + return (
{error.message.length !== 0 && ( @@ -572,7 +579,7 @@ const NewModule = () => { style={{ border: "solid 1.5px #c3c3c3", borderRadius: "7px", - padding: "12px", + padding: "0px", width: "100%", backgroundColor: "#fafafa", }} @@ -588,6 +595,7 @@ const NewModule = () => {

} + style={{ padding: "12px 12px 0px 12px" }} rules={[ { required: true, @@ -609,35 +617,54 @@ const NewModule = () => { > - + + + Target namespace +

+ Namespace used to deploy resources to +

+ + } + style={{ padding: "0px 12px 0px 12px" }} + hasFeedback={true} + validateDebounce={1000} + > + +
+ +
+ {advancedOptionsExpanded ? (
- Target namespace -

- Namespace used to deploy resources to -

+ Advanced +
- } - hasFeedback={true} - validateDebounce={1000} - > - - + ) : ( +
+ Advanced + +
+ )} +