Add actions flag to TableTd

This commit is contained in:
Marley 2023-07-13 14:52:43 -07:00
parent fab3d28548
commit 989629b0b6
2 changed files with 9 additions and 9 deletions

View file

@ -1,9 +1,9 @@
<script setup lang="ts">
defineProps<{actions?: boolean}>()
</script>
<template>
<td><slot /></td>
<td :class="{actions: actions}"><slot /></td>
</template>
<style lang="postcss">
@ -19,4 +19,10 @@ td {
@apply first-of-type:mt-0;
}
}
.actions a {
@apply me-3;
@apply last-of-type:me-0;
}
</style>

View file

@ -51,7 +51,7 @@ const patrons = [
<div>${{ patron.fines }}</div>
</TableTd>
<TableTd class="actions">
<TableTd actions>
<a href="#">Check Out</a>
<a href="#">View</a>
<a href="#">Edit</a>
@ -74,10 +74,4 @@ section {
.secondary-info {
@apply text-black/50;
}
.actions a {
@apply me-3;
@apply last-of-type:me-0;
}
</style>