REST Service for POPCORN - ILIAS
alex
2025-06-20 eda54046a40c108e993cb8efd73a1a36bcbfd225
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<script setup>
 
import IconKeyboard from "@/components/icons/IconKeyboard.vue"
import IconKeyboardStrikethrough from "@/components/icons/IconKeyboardStrikethrough.vue"
import {ref} from "vue"
 
const props = defineProps({
   initial: {
      type: Boolean,
      default: false
   },
})
const emit = defineEmits(["toggle"])
const strikethrough = ref(props.initial)
 
function toggle () {
   strikethrough.value = !strikethrough.value
   emit("toggle", strikethrough.value)
}
 
</script>
 
<template>
 
   <button @click="toggle" type="button">
      <IconKeyboard v-if="!strikethrough" />
      <IconKeyboardStrikethrough v-if="strikethrough" />
   </button>
 
</template>
 
<style scoped lang="stylus">
 
 
</style>