2021-02-21 12:30:33 +01:00
|
|
|
<template>
|
2021-03-15 22:31:18 +01:00
|
|
|
<router-link :to="{name: 'Inspect', params: {'address': result.entity}}" class="search-result">
|
2021-02-21 12:30:33 +01:00
|
|
|
<div class="search-result-container">
|
2021-03-15 22:31:18 +01:00
|
|
|
<div class="search-result-attribute">{{ result.attribute }}</div>
|
2021-02-21 12:30:33 +01:00
|
|
|
<div class="search-result-value">{{ result.value.c }}</div>
|
|
|
|
</div>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import {defineComponent, PropType} from "vue";
|
|
|
|
import {IEntry} from "@/types/base";
|
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
name: "SearchResult",
|
|
|
|
props: {
|
|
|
|
result: {
|
|
|
|
type: Object as PropType<IEntry>,
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.search-result {
|
|
|
|
.search-result-container {
|
|
|
|
box-shadow: var(--sl-shadow-medium);
|
|
|
|
margin: .5rem;
|
|
|
|
padding: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
color: #2c3e50;
|
|
|
|
text-decoration: inherit;
|
|
|
|
|
|
|
|
div {
|
|
|
|
margin: .5rem 0;
|
|
|
|
}
|
|
|
|
|
2021-03-15 22:31:18 +01:00
|
|
|
.search-result-attribute {
|
2021-02-21 12:30:33 +01:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|