diff --git a/src/App.jsx b/src/App.jsx index 14dac86..caf892a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,6 +1,41 @@ import './App.css' import React, { useState } from "react"; +// Reusable input with tooltip component +const InputWithTooltip = ({ type, name, placeholder, value, onChange, required, tooltip, className = "" }) => { + const [showTooltip, setShowTooltip] = useState(false); + + return ( +
+
+ +
setShowTooltip(true)} + onMouseLeave={() => setShowTooltip(false)} + > + + + +
+
+ {showTooltip && ( +
+ {tooltip} +
+ )} +
+ ); +}; + export default function HcpCliAssistant() { const steps = [ "Cluster Details", @@ -167,27 +202,143 @@ export default function HcpCliAssistant() { ) : (
{step === 0 && <> - - - - - + + + + + } - {step === 1 && <>{!form.osCloudSet && ( - <> - - - )} - - } + {step === 1 && <> + + + {!form.osCloudSet && ( + + )} + + + + + } + {step === 2 && ( <> - - - + + + + + + {/* Additional ports section remains the same */}
-

Additional Nodepool Ports (optional)

+

+ Additional Nodepool Ports (optional) + e.target.querySelector('div').style.display = 'block'} + onMouseLeave={(e) => e.target.querySelector('div').style.display = 'none'} + > + + + +
+ Configure additional network ports for the nodes in your cluster. Useful for multi-network setups or SR-IOV configurations. +
+
+

+ {form.additionalPorts && JSON.parse(form.additionalPorts).map((port, index) => (
@@ -294,7 +445,33 @@ export default function HcpCliAssistant() {
)} - {step === 3 && <>} + + {step === 3 && <> + + + + + + }
)}