fix: SW-1040 Updated fields clickable area

This commit is contained in:
Hrishikesh Vaipurkar
2024-11-28 18:04:15 +01:00
parent 86ddd79a38
commit dd0a699e4a
6 changed files with 67 additions and 33 deletions

View File

@@ -169,25 +169,27 @@ export default function Search({ locations }: SearchProps) {
</Caption>
</label>
<div {...getRootProps({}, { suppressRefError: true })}>
<Input
{...getInputProps({
id: name,
onFocus(evt) {
handleOnFocus(evt)
openMenu()
},
placeholder: intl.formatMessage({
id: "Destinations & hotels",
}),
...register(name, {
onBlur: function () {
closeMenu()
<label className={styles.searchInput}>
<Input
{...getInputProps({
id: name,
onFocus(evt) {
handleOnFocus(evt)
openMenu()
},
onChange: handleOnChange,
}),
type: "search",
})}
/>
placeholder: intl.formatMessage({
id: "Destinations & hotels",
}),
...register(name, {
onBlur: function () {
closeMenu()
},
onChange: handleOnChange,
}),
type: "search",
})}
/>
</label>
</div>
<SearchList
getItemProps={getItemProps}

View File

@@ -25,3 +25,15 @@
p {
color: var(--UI-Text-Active);
}
.searchInput {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
height: 100%;
padding: var(--Spacing-x3) var(--Spacing-x-one-and-half) var(--Spacing-x-half);
align-items: center;
display: grid;
}