Extract StateSecondaryInfo component

This commit is contained in:
Marley 2023-07-13 16:35:42 -07:00
parent 989629b0b6
commit 3d9ba89fe8
2 changed files with 17 additions and 6 deletions

View file

@ -0,0 +1,13 @@
<script setup lang="ts">
</script>
<template>
<span class="secondary-info"><slot /></span>
</template>
<style lang="postcss">
.secondary-info {
@apply text-black/50;
}
</style>

View file

@ -33,7 +33,7 @@ const patrons = [
<tr v-for="(patron, index) in patrons" :key="index">
<TableTd>
<div>{{ patron.name }}</div>
<div class="secondary-info">{{ patron.email }}</div>
<StateSecondaryInfo>{{ patron.email }}</StateSecondaryInfo>
</TableTd>
<TableTd>
@ -44,7 +44,9 @@ const patrons = [
<TableTd>
<div>{{ patron.checkedOut }} books</div>
<div class="secondary-info">{{ patron.overdue }} overdue</div>
<StateSecondaryInfo>
{{ patron.overdue }} overdue
</StateSecondaryInfo>
</TableTd>
<TableTd>
@ -70,8 +72,4 @@ const patrons = [
section {
@apply w-full px-10;
}
.secondary-info {
@apply text-black/50;
}
</style>