adjustment: removed autocomplete from RotationInputForm

This commit is contained in:
Sheen Capadngan
2024-04-23 20:55:43 +08:00
parent 20898c00c6
commit 80b0dc6895
2 changed files with 4 additions and 18 deletions
@@ -102,8 +102,7 @@ export const CreateRotationForm = ({
))} ))}
</Stepper> </Stepper>
<AnimatePresence exitBeforeEnter> <AnimatePresence exitBeforeEnter>
{/* TODO: Check this before merge */} {wizardStep === 0 && (
{wizardStep === 0 && wizardData.current.output && (
<motion.div <motion.div
key="input-step" key="input-step"
transition={{ duration: 0.1 }} transition={{ duration: 0.1 }}
@@ -118,8 +117,6 @@ export const CreateRotationForm = ({
setWizardStep((state) => state + 1); setWizardStep((state) => state + 1);
}} }}
inputSchema={provider.template?.inputs || {}} inputSchema={provider.template?.inputs || {}}
secretPath={wizardData.current.output.secretPath}
environment={wizardData.current.output.environment}
/> />
</motion.div> </motion.div>
)} )}
@@ -4,8 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { zodResolver } from "@hookform/resolvers/zod"; import { zodResolver } from "@hookform/resolvers/zod";
import { z } from "zod"; import { z } from "zod";
import { Button, FormControl, FormLabel, Tooltip } from "@app/components/v2"; import { Button, FormControl, FormLabel, SecretInput, Tooltip } from "@app/components/v2";
import { InfisicalSecretInput } from "@app/components/v2/InfisicalSecretInput/InfisicalSecretInput";
type Props = { type Props = {
onSubmit: (data: Record<string, string>) => void; onSubmit: (data: Record<string, string>) => void;
@@ -14,19 +13,11 @@ type Props = {
properties: Record<string, { type: string; desc?: string; default?: string }>; properties: Record<string, { type: string; desc?: string; default?: string }>;
required: string[]; required: string[];
}; };
secretPath: string;
environment: string;
}; };
const formSchema = z.record(z.string().trim().optional()); const formSchema = z.record(z.string().trim().optional());
export const RotationInputForm = ({ export const RotationInputForm = ({ onSubmit, onCancel, inputSchema }: Props) => {
onSubmit,
onCancel,
inputSchema,
secretPath,
environment
}: Props) => {
const { const {
control, control,
handleSubmit, handleSubmit,
@@ -65,12 +56,10 @@ export const RotationInputForm = ({
</div> </div>
} }
> >
<InfisicalSecretInput <SecretInput
{...field} {...field}
containerClassName="normal-case text-bunker-300 hover:border-primary-400/50 border border-mineshaft-600 bg-bunker-800 px-2 py-1.5" containerClassName="normal-case text-bunker-300 hover:border-primary-400/50 border border-mineshaft-600 bg-bunker-800 px-2 py-1.5"
required={inputSchema.required.includes(inputName)} required={inputSchema.required.includes(inputName)}
secretPath={secretPath}
environment={environment}
/> />
</FormControl> </FormControl>
)} )}