2023-12-09 15:47:03 +01:00
|
|
|
<template>
|
2024-08-23 12:23:01 +02:00
|
|
|
<div class="bg-slate-100 rounded-xl flex p-1 relative">
|
|
|
|
|
<button class="font-medium block flex-grow cursor-pointer">
|
2023-12-09 15:47:03 +01:00
|
|
|
<div
|
2024-08-23 12:23:01 +02:00
|
|
|
class="py-1.5 px-3 rounded-lg transition-colors transition-colors text-slate-500"
|
|
|
|
|
:class="{ 'bg-white shadow text-slate-900': !modelValue }"
|
2023-12-09 15:47:03 +01:00
|
|
|
@click="set(false)"
|
|
|
|
|
>
|
|
|
|
|
Monthly
|
|
|
|
|
</div>
|
|
|
|
|
</button>
|
2024-04-15 19:39:03 +02:00
|
|
|
<button
|
2024-08-23 12:23:01 +02:00
|
|
|
class="font-medium block flex-grow cursor-pointer"
|
2024-04-15 19:39:03 +02:00
|
|
|
@click="set(true)"
|
|
|
|
|
>
|
2023-12-09 15:47:03 +01:00
|
|
|
<div
|
2024-08-23 12:23:01 +02:00
|
|
|
class="py-1.5 px-4 rounded-lg transition-colors text-slate-500"
|
|
|
|
|
:class="{ 'bg-white shadow text-slate-900': modelValue }"
|
2023-12-09 15:47:03 +01:00
|
|
|
>
|
|
|
|
|
Yearly
|
|
|
|
|
</div>
|
|
|
|
|
</button>
|
2024-08-23 12:23:01 +02:00
|
|
|
<div
|
|
|
|
|
class="absolute hidden sm:block -right-4 -top-3 translate-x-full translate-y-full"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="justify-center px-2 py-1 text-xs font-semibold tracking-wide text-center text-emerald-600 uppercase bg-emerald-50 rounded-md"
|
|
|
|
|
>
|
|
|
|
|
Save 20%
|
|
|
|
|
</div>
|
2023-12-09 15:47:03 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2024-04-15 19:39:03 +02:00
|
|
|
import { defineEmits, defineProps } from "vue"
|
2023-12-09 15:47:03 +01:00
|
|
|
|
|
|
|
|
defineProps({
|
2024-04-15 19:39:03 +02:00
|
|
|
modelValue: { type: Boolean, required: true },
|
2023-12-09 15:47:03 +01:00
|
|
|
})
|
2024-04-15 19:39:03 +02:00
|
|
|
const emit = defineEmits(['update:modelValue'])
|
2023-12-09 15:47:03 +01:00
|
|
|
|
|
|
|
|
const set = (value) => {
|
2024-04-15 19:39:03 +02:00
|
|
|
emit("update:modelValue", value)
|
2023-12-09 15:47:03 +01:00
|
|
|
}
|
|
|
|
|
</script>
|