feat(search-bar): better search back result

This commit is contained in:
Corentin Thomasset
2022-12-16 21:44:54 +01:00
parent 1b5d4e72bd
commit 71e98e93e5
3 changed files with 78 additions and 8 deletions

View File

@@ -0,0 +1,45 @@
<script lang="ts" setup>
import type { ITool } from '@/tools/tool';
import { toRefs } from 'vue';
const props = defineProps<{ tool: ITool }>();
const { tool } = toRefs(props);
</script>
<template>
<div class="search-bar-item">
<n-icon class="icon" :component="tool.icon" />
<div>
<div class="name">{{ tool.name }}</div>
<div class="description">{{ tool.description }}</div>
</div>
</div>
</template>
<style lang="less" scoped>
.search-bar-item {
padding: 10px;
display: flex;
flex-direction: row;
align-items: center;
.icon {
font-size: 30px;
margin-right: 10px;
opacity: 0.7;
}
.name {
font-weight: bold;
font-size: 15px;
line-height: 1;
margin-bottom: 5px;
}
.description {
opacity: 0.7;
line-height: 1;
}
}
</style>