Files
radicle-explorer/src/components/DropdownList.svelte
T
Sebastian Martinez b8408db4f1 Improve the Branch Selector
We now also let people select branches if they only have one branch.
Renamed also some variables to make it clearer what they represent.
2023-11-23 09:57:35 +01:00

31 lines
644 B
Svelte

<script lang="ts">
type T = $$Generic;
export let items: T[];
export let styleDropdownMinWidth: string | undefined = undefined;
</script>
<style>
.dropdown {
align-items: center;
border-radius: var(--border-radius-small);
max-height: 60vh;
overflow-y: auto;
}
.dropdown-item {
padding: 0.25rem 0.25rem 0 0.25rem;
font-size: var(--font-size-small);
}
.dropdown-item:last-child {
padding-bottom: 0.25rem;
}
</style>
<div class="dropdown" style:min-width={styleDropdownMinWidth}>
{#each items as item}
<div class="dropdown-item">
<slot name="item" {item} />
</div>
{/each}
</div>