Add gap to lists

pull/5701/head
Cagatay Civici 2024-05-07 12:05:24 +03:00
parent a14ddd9b28
commit 89556ed54d
5 changed files with 10 additions and 11 deletions

View File

@ -85,6 +85,9 @@ const theme = ({ dt }) => `
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style-type: none; list-style-type: none;
display: flex;
flex-direction: column;
gap: ${dt('autocomplete.list.gap')};
padding: ${dt('autocomplete.list.padding')}; padding: ${dt('autocomplete.list.padding')};
} }
@ -102,14 +105,6 @@ const theme = ({ dt }) => `
border-radius: ${dt('autocomplete.option.border.radius')}; border-radius: ${dt('autocomplete.option.border.radius')};
} }
.p-autocomplete-option:first-child {
margin-top: 0;
}
.p-autocomplete-option:last-child {
margin-bottom: 0;
}
.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus { .p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {
background: ${dt('autocomplete.option.focus.background')}; background: ${dt('autocomplete.option.focus.background')};
color: ${dt('autocomplete.option.focus.color')}; color: ${dt('autocomplete.option.focus.color')};

View File

@ -30,7 +30,8 @@ export default {
shadow: '{overlay.select.shadow}' shadow: '{overlay.select.shadow}'
}, },
list: { list: {
padding: '{list.padding}' padding: '{list.padding}',
gap: '{list.gap}'
}, },
option: { option: {
focusBackground: '{list.option.focus.background}', focusBackground: '{list.option.focus.background}',

View File

@ -153,6 +153,7 @@ export default {
}, },
list: { list: {
padding: '0.25rem 0.25rem', padding: '0.25rem 0.25rem',
gap: '2px',
option: { option: {
padding: '0.5rem 0.75rem', padding: '0.5rem 0.75rem',
borderRadius: '4px' borderRadius: '4px'

View File

@ -30,7 +30,8 @@ export default {
shadow: '{overlay.select.shadow}' shadow: '{overlay.select.shadow}'
}, },
list: { list: {
padding: '{list.padding}' padding: '{list.padding}',
gap: '{list.gap}'
}, },
option: { option: {
focusBackground: '{list.option.focus.background}', focusBackground: '{list.option.focus.background}',
@ -41,7 +42,7 @@ export default {
selectedColor: '{list.option.selected.color}', selectedColor: '{list.option.selected.color}',
selectedFocusColor: '{list.option.selected.focus.color}', selectedFocusColor: '{list.option.selected.focus.color}',
padding: '{list.option.padding}', padding: '{list.option.padding}',
borderRadius: '{list.option.border.radius}' borderRadius: '{list.option.border.radius}',
}, },
optionGroup: { optionGroup: {
background: '{list.option.group.background}', background: '{list.option.group.background}',

View File

@ -152,6 +152,7 @@ export default {
}, },
list: { list: {
padding: '0.5rem 0', padding: '0.5rem 0',
gap: '0',
option: { option: {
padding: '0.625rem 0.75rem', padding: '0.625rem 0.75rem',
borderRadius: '0' borderRadius: '0'