import { FormikErrors, useFormikContext } from 'formik'; import { FormControl } from '@@/form-components/FormControl'; import { Input } from '@@/form-components/Input'; import { TextTip } from '@@/Tip/TextTip'; import { Values } from './types'; export function AdvancedForm({ values, errors, fieldNamespace, }: { values: Values; errors?: FormikErrors; fieldNamespace?: string; }) { const { setFieldValue } = useFormikContext(); return ( <> When using advanced mode, image and repository must be publicly available. setFieldValue(namespaced('image'), e.target.value)} placeholder="e.g. registry:port/my-image:my-tag" required /> ); function namespaced(field: string) { return fieldNamespace ? `${fieldNamespace}.${field}` : field; } }