import { useStateWrapper } from '@/react/hooks/useStateWrapper'; import { FormControl } from '@@/form-components/FormControl'; import { TextTip } from '@@/Tip/TextTip'; import { Input } from '@@/form-components/Input'; import { GitFormModel } from '../types'; import { isBE } from '../../feature-flags/feature-flags.service'; import { PathSelector } from './PathSelector'; interface Props { errors?: string; value: string; onChange(value: string): void; isCompose: boolean; model: GitFormModel; isDockerStandalone: boolean; } export function ComposePathField({ value, onChange, isCompose, model, isDockerStandalone, errors, }: Props) { const [inputValue, updateInputValue] = useStateWrapper(value, onChange); return (
Indicate the path to the{' '} {isCompose ? ( 'Compose' ) : ( Kubernetes manifest file )}{' '} from the root of your repository (requires a yaml, yml, json, or hcl file extension). {isDockerStandalone && ( To enable rebuilding of an image if already present on Docker standalone environments, include pull_policy: build in your compose file as per{' '} Docker documentation . )}
{isBE ? ( ) : ( { updateInputValue(e.target.value); }} placeholder={isCompose ? 'docker-compose.yml' : 'manifest.yml'} id="stack_repository_path" /> )}
); }