1- import { __ } from '@wordpress/i18n' ;
21import { useI18n } from '@wordpress/react-i18n' ;
32import FolderIcon from 'src/components/folder-icon' ;
43import { cx } from 'src/lib/cx' ;
@@ -12,18 +11,18 @@ export interface FormPathInputComponentProps {
1211 id ?: string ;
1312}
1413
15- export function FormPathInputComponent ( {
14+ export function FormPathInputComponent ( {
1615 value,
1716 onClick,
1817 error,
1918 doesPathContainWordPress,
2019 id,
21- } : FormPathInputComponentProps ) {
20+ } : FormPathInputComponentProps ) {
2221 const { __ } = useI18n ( ) ;
2322 return (
2423 < div className = "flex flex-col gap-2" >
2524 < button
26- aria-invalid = { ! ! error }
25+ aria-invalid = { ! ! error }
2726 /**
2827 * The below `aria-describedby` presumes the error message always
2928 * relates to the local path input, which is true currently as it is the
@@ -32,41 +31,36 @@ export function FormPathInputComponent( {
3231 * `aria-describedby` attribute so that it only targets relevant error
3332 * messages.
3433 */
35- aria-describedby = { error ? 'site-path-error' : undefined }
34+ aria-describedby = { error ? 'site-path-error' : undefined }
3635 type = "button"
37- aria-label = { `${ value } , ${ __ ( 'Select different local path' ) } ` }
38- className = { cx (
39- 'flex flex-row items-stretch rounded-sm border border-[#949494] focus:border-a8c-blue-50 focus:shadow-[0_0_0_0.5px_black ] focus:shadow-a8c-blue-50 outline-none transition-shadow transition-linear duration-100 [&_.local-path-icon]:focus:border-l-a8c-blue-50 [&:disabled]:cursor-not-allowed' ,
36+ aria-label = { `${ value } , ${ __ ( 'Select different local path' ) } ` }
37+ className = { cx (
38+ 'flex flex-row items-stretch rounded-sm border border-frame-border focus:border-frame-theme focus:shadow-[0_0_0_0.5px ] focus:shadow-a8c-blue-50 outline-none transition-shadow transition-linear duration-100 [&_.local-path-icon]:focus:border-l-frame-theme [&:disabled]:cursor-not-allowed' ,
4039 error && 'border-red-500 [&_.local-path-icon]:border-l-red-500'
41- ) }
40+ ) }
4241 data-testid = "select-path-button"
43- onClick = { onClick }
44- id = { id }
42+ onClick = { onClick }
43+ id = { id }
4544 >
46- < div
47- aria-hidden = "true"
48- tabIndex = { - 1 }
49- className = "w-full text-left pl-3 py-3 min-h-10"
50- onChange = { ( ) => { } }
51- >
52- { value }
45+ < div aria-hidden = "true" tabIndex = { - 1 } className = "w-full text-left pl-3 py-3 min-h-10" >
46+ { value }
5347 </ div >
5448 < div
5549 aria-hidden = "true"
5650 className = "local-path-icon flex items-center py-[9px] px-2.5 self-center"
5751 >
58- < FolderIcon className = "text-[#3C434A] " />
52+ < FolderIcon className = "text-frame-text-secondary " />
5953 </ div >
6054 </ button >
6155 < SiteFormError
62- error = { error }
56+ error = { error }
6357 tipMessage = {
6458 doesPathContainWordPress
65- ? __ ( 'The existing WordPress site at this path will be added.' )
59+ ? __ ( 'The existing WordPress site at this path will be added.' )
6660 : ''
6761 }
6862 />
69- < input type = "hidden" data-testid = "local-path-input" value = { value } />
63+ < input type = "hidden" data-testid = "local-path-input" value = { value } />
7064 </ div >
7165 ) ;
7266}
0 commit comments