Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix styling combobox #270

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/[locale]/incident/add/components/MapDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ const MapDialog = ({
) : null}
</div>
<Dialog.Close asChild onClick={() => closeMapDialog()}>
<Button appearance="primary-action-button">
<Button appearance="primary-action-button" className="ml-4">
{isAssetSelect
? formState.selectedFeatures.length === 0
? t('go_further_without_selected_object')
Expand Down
12 changes: 11 additions & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@
}

.map-button {
padding: 16px !important;
padding-bottom: 16px !important;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.map-close-button {
Expand Down Expand Up @@ -289,3 +293,9 @@
--utrecht-icon-inset-block-start: 0.15em !important;
--utrecht-link-list-icon-inset-block-start: 0.15em !important;
}


/* combobox */
.address-listbox {
border-radius: var(--utrecht-textbox-border-radius, var(--utrecht-form-control-border-radius, 0)) !important;
}
6 changes: 3 additions & 3 deletions src/components/ui/AddressCombobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,21 @@ export const AddressCombobox = ({
/>
<ComboboxOptions
anchor="bottom"
className="utrecht-listbox utrecht-listbox--html-div fixed z-[9999] pointer-events-auto"
className="address-listbox utrecht-listbox utrecht-listbox--html-div fixed z-[9999] pointer-events-auto"
>
<div className={'utrecht-listbox__list'}>
{addressOptions.length > 0 ? (
addressOptions.map((address) => (
<ComboboxOption
key={address.id}
value={address}
className="utrecht-listbox__option data-[focus]:bg-blue-100"
className="utrecht-listbox__option data-[focus]:bg-blue-100 !px-3 !py-1"
>
{address.weergave_naam}
</ComboboxOption>
))
) : (
<ComboboxOption value="" className="p-3 utrecht-listbox--disabled">
<ComboboxOption value="" className="!px-3 !py-1 utrecht-listbox--disabled">
<StatusText>{t('no_results')}</StatusText>
</ComboboxOption>
)}
Expand Down
Loading