Skip to content

Commit

Permalink
feat(component): make CorrectionButton
Browse files Browse the repository at this point in the history
this will also mutate another separate screen.
The separate screen will be developed soon.

fix #32
  • Loading branch information
lemredd committed Dec 20, 2022
1 parent f79a138 commit 9deae04
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/components/CalculatorContainer/CorrectionButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script setup lang="ts">
type Corrections = "CE"|"C"|""
interface Props {
value: Corrections
}
const props = defineProps<Props>()
interface CustomEvents {
(event: "appendToScreen", valueToAppend: string): void
}
const emit = defineEmits<CustomEvents>()
function appendToScreen() {
emit("appendToScreen", props.value)
}
</script>

<template>
<button class="correction-button" @click="appendToScreen">
{{ props.value }}
</button>
</template>

<style scoped lang="scss">
</style>

0 comments on commit 9deae04

Please sign in to comment.