diff --git a/frontend/src/app/components/checkbox/CheckBox.jsx b/frontend/src/app/components/checkbox/CheckBox.jsx new file mode 100644 index 0000000..e1a10e6 --- /dev/null +++ b/frontend/src/app/components/checkbox/CheckBox.jsx @@ -0,0 +1,42 @@ +"use client"; +import { useState } from "react"; +import CheckIcon from "../icons/check"; +import styles from "./styles.module.css"; +import CloseIcon from "../icons/close"; +import CheckedIcon from "../icons/switchIcons/checked"; +import UnCheckedIcon from "../icons/switchIcons/unchecked"; + +const CustomCheckbox = ({ checked, onChange, id }) => { + const [isChecked, setIsChecked] = useState(false); + return ( + <> + { + setIsChecked(!isChecked); + onChange; + }} + /> + + + > + ); +}; + +export default CustomCheckbox; diff --git a/frontend/src/app/components/checkbox/styles.module.css b/frontend/src/app/components/checkbox/styles.module.css new file mode 100644 index 0000000..e1d38db --- /dev/null +++ b/frontend/src/app/components/checkbox/styles.module.css @@ -0,0 +1,46 @@ +.switch { + display: flex; + width: 53px; + + height: 33px; + align-items: center; + background-color: white; + cursor: pointer; + padding: 0 2px; + border-radius: 150px; + position: relative; + border: 2px solid #6d6d6d; + overflow: hidden; +} + +.check { + display: none; +} + +/* The knob (replaces ::before) */ +.knob { + width: 25px; + height: 25px; + background-color: #6d6d6d; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + + transition: all 0.15s ease-in-out; +} +.knob:hover { + box-shadow: 0 0 0px 5px #33333327; + background-color: #333; +} + +.check:checked + .switch .knob { + transform: translateX(78%); + background-color: white; +} + +/* Optional background change */ +.check:checked + .switch { + background-color: #8187ff; + border: 2px solid #8187ff; +} diff --git a/frontend/src/app/components/fields/styles.module.css b/frontend/src/app/components/fields/styles.module.css index 3286a49..1379e46 100644 --- a/frontend/src/app/components/fields/styles.module.css +++ b/frontend/src/app/components/fields/styles.module.css @@ -25,6 +25,15 @@ border: 1px solid #959aff; background: rgba(75, 79, 109, 0.25); } +.input:active::placeholder, +.input:focus::placeholder { + color: #4b4f6d; + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} .input:hover { background: rgba(75, 79, 109, 0.25); } diff --git a/frontend/src/app/components/icons/arrowDown.jsx b/frontend/src/app/components/icons/arrowDown.jsx new file mode 100644 index 0000000..e83b8d8 --- /dev/null +++ b/frontend/src/app/components/icons/arrowDown.jsx @@ -0,0 +1,28 @@ +const ArrowDownIcon = ({ + width = 18, + height = 18, + color = "#4C4F6B", + + ...props +}) => { + return ( + + ); +}; + +export default ArrowDownIcon; diff --git a/frontend/src/app/components/icons/switchIcons/checked.jsx b/frontend/src/app/components/icons/switchIcons/checked.jsx new file mode 100644 index 0000000..89629b7 --- /dev/null +++ b/frontend/src/app/components/icons/switchIcons/checked.jsx @@ -0,0 +1,30 @@ +import React from "react"; + +const CheckedIcon = ({ + width = 20, + height = 20, + color = "white", + strokeWidth = 1.5, + ...props +}) => { + return ( + + ); +}; + +export default CheckedIcon; diff --git a/frontend/src/app/components/icons/switchIcons/unchecked.jsx b/frontend/src/app/components/icons/switchIcons/unchecked.jsx new file mode 100644 index 0000000..6bec211 --- /dev/null +++ b/frontend/src/app/components/icons/switchIcons/unchecked.jsx @@ -0,0 +1,39 @@ +import React from "react"; + +const UnCheckedIcon = ({ + width = 20, + height = 20, + color = "white", + strokeWidth = 1.5, + + viewBox = "0 0 28 28", + ...props +}) => { + return ( + + ); +}; + +export default UnCheckedIcon; diff --git a/frontend/src/app/components/icons/warning.jsx b/frontend/src/app/components/icons/warning.jsx new file mode 100644 index 0000000..58b78af --- /dev/null +++ b/frontend/src/app/components/icons/warning.jsx @@ -0,0 +1,38 @@ +import React from "react"; + +const WarningIcon = (props) => { + return ( + + ); +}; + +export default WarningIcon; diff --git a/frontend/src/app/components/select/SelectField.jsx b/frontend/src/app/components/select/SelectField.jsx new file mode 100644 index 0000000..d155bc6 --- /dev/null +++ b/frontend/src/app/components/select/SelectField.jsx @@ -0,0 +1,71 @@ +"use client"; +import React, { useState, useRef, useEffect } from "react"; +import styles from "./styles.module.css"; +import ArrowDownIcon from "../icons/arrowDown"; + +const SelectField = ({ label, options, ...props }) => { + const [showOptions, setShowOptions] = useState(false); + const [dropUp, setDropUp] = useState(false); + + const selectRef = useRef(null); + + const [currentSelected, setCurrentSelected] = useState({ + label: label, + value: "", + }); + + useEffect(() => { + if (showOptions && selectRef.current) { + const rect = selectRef.current.getBoundingClientRect(); + const spaceBelow = window.innerHeight - rect.bottom; + const spaceAbove = rect.top; + const dropdownHeight = 150; + + if (spaceBelow < dropdownHeight && spaceAbove > dropdownHeight) { + setDropUp(true); + } else { + setDropUp(false); + } + } + }, [showOptions]); + + return ( +
{opt.label}
+{props.buttonText}
The name is already in used. You can try another.
Project Details
+Name
+Version
++ Image (Optional) +
+Port
+Ingress
+Ingress
+Resource
+CPU Request (MB)
+CPU Limit (MB)
+Memory Request (MB)
+Memory Limit (MB)
+Auto Scaling
+Minimum pods
+ +Maximum pods
+Readiness
+Readiness Path
+Readiness Port
+Liveness
+Liveness Path
+Liveness Port
+ +Environment Variables
+Volumes
+Config Maps
+Environment Variables
+Key
+Value
+No Environment Variables added
+{data.key}
+{data.value}
+Volumes
+Name
+Path
+Size/Type
+Access Mode
+Storage Class
+No volume added
+Config maps
+No config map added
+Ingress
- +Ingress
- +Auto Scaling
+Name
+Minimum pods
-Version
-Maximum pods
+Readiness
+Readiness Path
- + +Readiness Port
- +Liveness
+Volumes
+Config Maps
Protocol
-Service
-