refactor: rename Channel to ChannelEntry
This commit is contained in:
parent
7b62d352f8
commit
a3feb07e73
2 changed files with 4 additions and 2 deletions
41
components/Guild/ChannelEntry.vue
Normal file
41
components/Guild/ChannelEntry.vue
Normal file
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<div v-if="isCurrentChannel" class="channel-list-link-container rounded-corners current-channel" tabindex="0">
|
||||
<NuxtLink class="channel-list-link" :href="props.href" tabindex="-1">
|
||||
# {{ props.name }}
|
||||
</NuxtLink>
|
||||
</div>
|
||||
<div v-else class="channel-list-link-container rounded-corners" tabindex="0">
|
||||
<NuxtLink class="channel-list-link" :href="props.href" tabindex="-1">
|
||||
# {{ props.name }}
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
const props = defineProps<{ name: string, uuid: string, currentUuid: string, href: string }>();
|
||||
|
||||
const isCurrentChannel = props.uuid == props.currentUuid;
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.channel-list-link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
padding-left: .25em;
|
||||
padding-right: .25em;
|
||||
}
|
||||
|
||||
.channel-list-link-container {
|
||||
text-align: left;
|
||||
display: flex;
|
||||
height: 1.5em;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.current-channel {
|
||||
background-color: var(--sidebar-highlighted-background-color);
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue