1
- import React from 'react'
1
+ // Disabling due to react select issue
2
+ /* eslint-disable jsx-a11y/label-has-associated-control */
3
+ import React , { FunctionComponent } from 'react'
2
4
import ReactSelect from 'react-select'
3
5
import Tippy from '@tippyjs/react'
4
6
import { CustomInput } from '@devtron-labs/devtron-fe-common-lib'
5
7
import { renderOptionIcon , repositoryControls , repositoryOption } from './CIBuildpackBuildOptions'
6
8
import { _multiSelectStyles } from './CIConfig.utils'
7
9
import { CISelfDockerBuildOptionProps } from './types'
8
10
9
- export default function CISelfDockerBuildOption ( {
11
+ const CISelfDockerBuildOption : FunctionComponent < CISelfDockerBuildOptionProps > = ( {
10
12
readOnly,
11
13
sourceMaterials,
12
14
readonlyDockerfileRelativePath,
@@ -18,25 +20,23 @@ export default function CISelfDockerBuildOption({
18
20
handleOnChangeConfig,
19
21
handleFileLocationChange,
20
22
dockerfileError,
21
- } : CISelfDockerBuildOptionProps ) {
23
+ } ) => {
22
24
if ( readOnly ) {
23
25
return (
24
26
< div className = { `${ configOverrideView ? 'mb-12' : '' } form-row__docker` } >
25
27
< div className = { `form__field ${ configOverrideView ? 'mb-0-imp' : '' } ` } >
26
- < label className = "form__label" > Repository containing Dockerfile</ label >
28
+ < span className = "form__label" > Repository containing Dockerfile</ span >
27
29
28
30
< div className = "flex left" >
29
31
{ currentMaterial ?. url && renderOptionIcon ( currentMaterial . url ) }
30
32
< span className = "fs-14 fw-4 lh-20 cn-9" > { currentMaterial ?. name || 'Not selected' } </ span >
31
33
</ div >
32
34
33
- { repositoryError && < label className = "form__error" > { repositoryError } </ label > }
35
+ { repositoryError && < span className = "form__error" > { repositoryError } </ span > }
34
36
</ div >
35
37
36
38
< div className = { `form__field ${ configOverrideView ? 'mb-0-imp' : '' } ` } >
37
- < label htmlFor = "" className = "form__label dc__required-field" >
38
- Dockerfile Path (Relative)
39
- </ label >
39
+ < span className = "form__label dc__required-field" > Dockerfile Path (Relative)</ span >
40
40
41
41
< span className = "fs-14 fw-4 lh-20 cn-9" > { readonlyDockerfileRelativePath } </ span >
42
42
</ div >
@@ -52,7 +52,6 @@ export default function CISelfDockerBuildOption({
52
52
< ReactSelect
53
53
className = "m-0"
54
54
classNamePrefix = "build-config__select-repository-containing-dockerfile"
55
- tabIndex = { 3 }
56
55
isMulti = { false }
57
56
isClearable = { false }
58
57
options = { sourceMaterials }
@@ -96,7 +95,6 @@ export default function CISelfDockerBuildOption({
96
95
</ Tippy >
97
96
98
97
< CustomInput
99
- tabIndex = { 4 }
100
98
rootClassName = "file-name"
101
99
data-testid = "dockerfile-path-text-box"
102
100
placeholder = "Dockerfile"
@@ -112,3 +110,5 @@ export default function CISelfDockerBuildOption({
112
110
</ div >
113
111
)
114
112
}
113
+
114
+ export default CISelfDockerBuildOption
0 commit comments