Merged in feat/sw-620-sort-hotels (pull request #868)

Feat/sw-620 sort hotels

* SW-620 Add radio button to select box

* feat(SW-620): Implement sorting on select hotel

* Fix casing

* Shallow copy hoteldata

* Use translations

* Remove unnecessary style

* Import order

* Type


Approved-by: Pontus Dreij
This commit is contained in:
Niclas Edenvin
2024-11-11 08:55:49 +00:00
parent 8fbfb00ead
commit 0f97757e31
14 changed files with 179 additions and 33 deletions

View File

@@ -35,6 +35,7 @@ export default function Select({
tabIndex,
value,
maxHeight,
showRadioButton = false,
}: SelectProps) {
const [rootDiv, setRootDiv] = useState<SelectPortalContainer>(undefined)
@@ -88,7 +89,7 @@ export default function Select({
{items.map((item) => (
<ListBoxItem
aria-label={String(item)}
className={styles.listBoxItem}
className={`${styles.listBoxItem} ${showRadioButton && styles.showRadioButton}`}
id={item.value}
key={item.label}
data-testid={item.label}