diff options
Diffstat (limited to 'src/components/ToolCard.vue')
-rw-r--r-- | src/components/ToolCard.vue | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/components/ToolCard.vue b/src/components/ToolCard.vue index db67914..9ccaec7 100644 --- a/src/components/ToolCard.vue +++ b/src/components/ToolCard.vue @@ -1,3 +1,17 @@ +<script setup lang="ts"> +import { useThemeVars } from 'naive-ui'; +import { toRefs } from 'vue'; +import FavoriteButton from './FavoriteButton.vue'; +import { useAppTheme } from '@/ui/theme/themes'; +import type { Tool } from '@/tools/tools.types'; + +const props = defineProps<{ tool: Tool & { category: string } }>(); +const { tool } = toRefs(props); +const theme = useThemeVars(); + +const appTheme = useAppTheme(); +</script> + <template> <router-link :to="tool.path"> <c-card class="tool-card"> @@ -16,7 +30,7 @@ New </n-tag> - <favorite-button :tool="tool" /> + <FavoriteButton :tool="tool" /> </div> </div> <n-h3 class="title"> @@ -26,27 +40,13 @@ <div class="description"> <n-ellipsis :line-clamp="2" :tooltip="false" style="min-height: 44.78px"> {{ tool.description }} - <br /> + <br> </n-ellipsis> </div> </c-card> </router-link> </template> -<script setup lang="ts"> -import type { Tool } from '@/tools/tools.types'; -import { useThemeVars } from 'naive-ui'; -import { toRefs } from 'vue'; -import { useAppTheme } from '@/ui/theme/themes'; -import FavoriteButton from './FavoriteButton.vue'; - -const props = defineProps<{ tool: Tool & { category: string } }>(); -const { tool } = toRefs(props); -const theme = useThemeVars(); - -const appTheme = useAppTheme(); -</script> - <style lang="less" scoped> a { text-decoration: none; |