54 lines
1 KiB
Vue
54 lines
1 KiB
Vue
<template>
|
|
<div class="section-label">
|
|
<Icon v-if="icon" :name="icon" size="0.95rem" class="section-label__icon" />
|
|
<span class="eyebrow">
|
|
<slot />
|
|
</span>
|
|
<span v-if="count != null" class="eyebrow eyebrow--count">· {{ count }}</span>
|
|
<div class="section-label__rule" />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
defineProps<{
|
|
/** Optional leading Carbon icon. */
|
|
icon?: string
|
|
/** Optional trailing count. */
|
|
count?: number | null
|
|
}>()
|
|
</script>
|
|
|
|
<style scoped>
|
|
.section-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin: 0 2px 2px;
|
|
}
|
|
|
|
.section-label__icon {
|
|
color: var(--color-6);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.eyebrow {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.68rem;
|
|
font-weight: var(--weight-semibold);
|
|
letter-spacing: 0.12em;
|
|
text-transform: uppercase;
|
|
color: var(--text-faint);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.eyebrow--count {
|
|
color: var(--color-5);
|
|
}
|
|
|
|
.section-label__rule {
|
|
flex: 1;
|
|
height: 1px;
|
|
background: var(--border-subtle);
|
|
margin-left: 4px;
|
|
}
|
|
</style>
|