Add feature
This commit is contained in:
@@ -4,7 +4,10 @@ import CloseIcon from "@/app/components/icons/close";
|
||||
import TextField from "@/app/components/fields/textfield";
|
||||
import AddIcon from "@/app/components/icons/add";
|
||||
import PrimaryButton from "@/app/components/buttons/primarybutton/PrimaryButton";
|
||||
import SelectField from "@/app/components/select/SelectField";
|
||||
import RadioButton from "@/app/components/radio-button/RadioButton";
|
||||
const AddConfigMapModal = (props) => {
|
||||
const [typeOption, setTypeOption] = useState("raw");
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.modal}>
|
||||
@@ -33,21 +36,20 @@ const AddConfigMapModal = (props) => {
|
||||
<div>
|
||||
<p>Type</p>
|
||||
<div>
|
||||
{" "}
|
||||
<div>
|
||||
<label className={styles.radio}>
|
||||
<input type="radio" name="typeOption" />
|
||||
<span className={styles.custom}></span>
|
||||
Raw
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label className={styles.radio}>
|
||||
<input type="radio" name="typeOption" />
|
||||
<span className={styles.custom}></span>
|
||||
Credential
|
||||
</label>
|
||||
</div>
|
||||
<RadioButton
|
||||
name="typeOption"
|
||||
value="raw"
|
||||
checked={typeOption === "raw"}
|
||||
onChange={(e) => setTypeOption(e.target.value)}
|
||||
label="Raw"
|
||||
/>
|
||||
<RadioButton
|
||||
name="typeOption"
|
||||
value="credential"
|
||||
checked={typeOption === "credential"}
|
||||
onChange={(e) => setTypeOption(e.target.value)}
|
||||
label="Credential"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,11 +59,22 @@ const AddConfigMapModal = (props) => {
|
||||
<p>Value</p>
|
||||
</div>
|
||||
|
||||
<textarea
|
||||
name=""
|
||||
id=""
|
||||
placeholder="Enter a description"
|
||||
></textarea>
|
||||
{typeOption === "raw" ? (
|
||||
<textarea
|
||||
name=""
|
||||
id=""
|
||||
placeholder="Enter a description"
|
||||
></textarea>
|
||||
) : (
|
||||
<SelectField
|
||||
label="Select"
|
||||
options={[
|
||||
{ label: "Option", value: "option" },
|
||||
{ label: "Option 1", value: "option 1" },
|
||||
{ label: "Option 2", value: "option 2" },
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user