File tree Expand file tree Collapse file tree 2 files changed +11
-16
lines changed
application/CohortManager/src/Web/app Expand file tree Collapse file tree 2 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ export function SearchNhsNumber() {
77 const [ nhsNumber , setNhsNumber ] = useState ( "" ) ;
88
99 const isValidNhsNumber = ( value : string ) : boolean => {
10- const cleaned = value . replaceAll ( " " , "" ) ;
10+ const cleaned = value . trim ( ) . replaceAll ( " " , "" ) ;
1111 return cleaned . length === 10 && / ^ \d + $ / . test ( cleaned ) ;
1212 } ;
1313
1414 const handleSubmit = ( e : FormEvent < HTMLFormElement > ) => {
1515 e . preventDefault ( ) ;
16- const cleanedNhsNumber = nhsNumber . replaceAll ( " " , "" ) ;
16+ const cleanedNhsNumber = nhsNumber . trim ( ) . replaceAll ( " " , "" ) ;
1717
1818 if ( ! isValidNhsNumber ( nhsNumber ) ) {
1919 router . push ( `/exceptions/noResults` ) ;
@@ -39,12 +39,11 @@ export function SearchNhsNumber() {
3939 } ;
4040
4141 return (
42- < search className = "nhsuk-header__search" >
43- < form
44- className = "nhsuk-header__search-form"
45- id = "search"
46- onSubmit = { handleSubmit }
47- >
42+ < form
43+ className = "nhsuk-header__search-form"
44+ id = "search"
45+ onSubmit = { handleSubmit }
46+ >
4847 < label className = "nhsuk-u-visually-hidden" htmlFor = "search-field" >
4948 Search by NHS number
5049 </ label >
@@ -74,6 +73,5 @@ export function SearchNhsNumber() {
7473 </ svg >
7574 </ button >
7675 </ form >
77- </ search >
7876 ) ;
7977}
Original file line number Diff line number Diff line change 165165.nhsuk-header__content {
166166 display : flex ;
167167 align-items : center ;
168+ gap : clamp (8px , 2vw , 24px );
169+ flex-wrap : wrap ;
168170 justify-content : space-between ;
169- flex-wrap : nowrap ;
170171}
171172
172173.nhsuk-header__service {
176177
177178.nhsuk-header__search {
178179 flex : 1 ;
179- min-width : 250px ;
180- }
181-
182- .nhsuk-header .nhsuk-header__search {
183- margin : 0 100px ;
180+ min-width : min (240px , 40vw );
181+ max-width : 420px ;
184182}
185183
186184.nhsuk-header__search-form {
187185 display : flex ;
188- fill : currentColor ;
189186}
190187
191188.nhsuk-header__account {
You can’t perform that action at this time.
0 commit comments