import type { FormikProps } from 'formik' ; import React from 'react' ; import type { IDockerTrigger } from '@spinnaker/core' ; import type { IDockerImageAndTagChanges } from '../../image' ; import { DockerImageAndTagSelector } from '../../image' ; export interface IDockerTriggerConfigProps { formik : FormikProps < IDockerTrigger > ; triggerUpdated : ( trigger : IDockerTrigger ) => void ; } export function DockerTriggerConfig ( props ) { const { formik } = props ; const trigger = formik . values ; const dockerChanged = ( changes ) => { const { imageId , ... rest } = changes ; props . triggerUpdated ( rest as IDockerTrigger ) ; } ; return ( < div className = "form-horizontal" > < DockerImageAndTagSelector allowManualDefinition = { false } specifyTagByRegex = { true } account = { trigger . account } organization = { trigger . organization } registry = { trigger . registry } repository = { trigger . repository } tag = { trigger . tag } showRegistry = { true } onChange = { dockerChanged } showDigest = { false } / > < /div>); }