Skip to content

Commit c6351a2

Browse files
committed
fix: spacing issues added as props in droplist
1 parent 6276e2a commit c6351a2

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

src/lib/components/dropList.svelte

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
export let wrapperFullWidth = false;
1515
export let position: 'relative' | 'static' = 'relative';
1616
export let noMaxWidthList = false;
17+
export let paddingBlock: string = undefined;
18+
export let paddingInline: string = undefined;
19+
export let resetListPadding: boolean = false;
20+
export let gap: string = undefined;
1721
let classes: string = '';
1822
export { classes as class };
1923
</script>
@@ -34,14 +38,20 @@
3438
class="drop is-no-arrow {classes}"
3539
class:u-max-width-100-percent={fullWidth}
3640
style:--drop-width-size-desktop={width ? `${width}rem` : ''}
41+
style:margin-block-start={gap}
3742
style:position>
3843
{#if $$slots.list}
3944
<section
4045
class:u-overflow-y-auto={scrollable}
4146
class:u-max-height-200={scrollable}
4247
class="drop-section"
43-
style={noMaxWidthList ? 'max-inline-size: 100%' : ''}>
44-
<ul class="drop-list">
48+
style={noMaxWidthList ? 'max-inline-size: 100%' : ''}
49+
style:padding-block={paddingBlock}
50+
style:padding-inline={paddingInline}>
51+
<ul
52+
class="drop-list"
53+
style:padding={resetListPadding ? '0' : undefined}
54+
style:margin={resetListPadding ? '0' : undefined}>
4555
<slot name="list" />
4656
</ul>
4757
</section>

src/routes/(console)/project-[region]-[project]/databases/database-[database]/backups/containerHeader.svelte

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646
width="16"
4747
noArrow
4848
placement="bottom-start"
49-
class="gap-popover policies-popover">
49+
gap="6px"
50+
paddingBlock="var(--space-5, 12px)"
51+
paddingInline="var(--space-6, 16px)"
52+
resetListPadding>
5053
{#if $organization?.billingPlan === BillingPlan.PRO}
5154
<Tag
5255
size="s"
@@ -99,15 +102,4 @@
99102
.is-disabled {
100103
opacity: 0.5;
101104
}
102-
:global(.drop.gap-popover) {
103-
margin-block-start: 6px;
104-
}
105-
:global(.drop.policies-popover .drop-section) {
106-
padding-block: var(--space-5, 12px);
107-
padding-inline: var(--space-6, 16px);
108-
}
109-
:global(.drop.policies-popover .drop-list) {
110-
padding: 0;
111-
margin: 0;
112-
}
113105
</style>

0 commit comments

Comments
 (0)