Files
hoppscotch/packages/hoppscotch-ui/src/components/smart/Radio.vue
Joel Jacob Stephen 3f59597864 feat: introducing self hosted admin dashboard package (#12)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Co-authored-by: Anwarul Islam <anwaarulislaam@gmail.com>
2023-02-28 13:13:27 +05:30

30 lines
613 B
Vue

<template>
<HoppSmartItem :label="label" :icon="selected ? IconCircleDot : IconCircle" :active="selected" role="radio"
:aria-checked="selected" @click="emit('change', value)" />
</template>
<script setup lang="ts">
import { HoppSmartItem } from "."
import IconCircleDot from "~icons/lucide/circle-dot"
import IconCircle from "~icons/lucide/circle"
defineProps({
value: {
type: String,
default: "",
},
label: {
type: String,
default: "",
},
selected: {
type: Boolean,
default: false,
},
})
const emit = defineEmits<{
(e: "change", value: string): void
}>()
</script>