mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-03 03:01:40 +00:00
[photon-client] Change UI naming schema from CV to PV (#955)
This commit is contained in:
40
photon-client/src/components/common/pv-icon.vue
Normal file
40
photon-client/src/components/common/pv-icon.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<script setup lang="ts">
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
iconName: string;
|
||||
color?: string;
|
||||
tooltip?: string;
|
||||
right?: boolean;
|
||||
hover?: boolean;
|
||||
}>(),
|
||||
{
|
||||
right: false,
|
||||
hover: false
|
||||
}
|
||||
);
|
||||
|
||||
defineEmits<{
|
||||
(e: "click"): void;
|
||||
}>();
|
||||
|
||||
const hoverClass = props.hover ? "hover" : "";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-tooltip :right="right" :bottom="!right" nudge-right="10" :disabled="tooltip === undefined">
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-icon :class="hoverClass" :color="color" v-bind="attrs" v-on="on" @click="$emit('click')">
|
||||
{{ iconName }}
|
||||
</v-icon>
|
||||
</template>
|
||||
<span>{{ tooltip }}</span>
|
||||
</v-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.hover:hover {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user