Files
web/src/components/BuySellToggle.vue
2023-08-27 21:01:17 -04:00

23 lines
483 B
Vue

<template>
<v-btn :text="modelValue ? 'Buy' : 'Sell'" :color="modelValue ? 'green' : 'red'"
variant="outlined" size="x-large" @click="toggle"/>
</template>
<script setup>
import {useStore} from "@/store/store";
const s = useStore()
const props = defineProps(['modelValue'])
const emit = defineEmits(['update:modelValue'])
function toggle() {
emit('update:modelValue', !props.modelValue)
}
</script>
<style scoped lang="scss">
@use "src/styles/vars" as *;
</style>