mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-11 12:50:34 +08:00
Co-authored-by: Thomas Scholtes <geigerzaehler@axiom.fm> Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
41 lines
801 B
Svelte
41 lines
801 B
Svelte
<script lang="ts">
|
|
export let active: boolean;
|
|
export let name: string;
|
|
</script>
|
|
|
|
<style>
|
|
.file {
|
|
color: var(--color-foreground-6);
|
|
border-radius: var(--border-radius-small);
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
line-height: 1.5em;
|
|
margin: 0.125rem 0;
|
|
padding: 0.25rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.file:hover {
|
|
background-color: var(--color-foreground-1);
|
|
}
|
|
|
|
.file.active {
|
|
color: var(--color-foreground) !important;
|
|
background-color: var(--color-foreground-1);
|
|
}
|
|
|
|
.name {
|
|
margin-left: 0.25rem;
|
|
user-select: none;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis !important;
|
|
overflow: hidden;
|
|
max-width: 24ch;
|
|
}
|
|
</style>
|
|
|
|
<div class="file" class:active>
|
|
<span class="name">{name}</span>
|
|
</div>
|