summaryrefslogtreecommitdiff
path: root/packages/client/src/components/number-diff.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-08-31 00:24:33 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-08-31 00:24:33 +0900
commit786b150ea75111b5f6102c256d5cfa42cb83d1fb (patch)
treed552d0c371829d7ff027890d1036a80bb08517f7 /packages/client/src/components/number-diff.vue
parentupdate deps (diff)
downloadsharkey-786b150ea75111b5f6102c256d5cfa42cb83d1fb.tar.gz
sharkey-786b150ea75111b5f6102c256d5cfa42cb83d1fb.tar.bz2
sharkey-786b150ea75111b5f6102c256d5cfa42cb83d1fb.zip
refactor(client): align filename to component name
Diffstat (limited to 'packages/client/src/components/number-diff.vue')
-rw-r--r--packages/client/src/components/number-diff.vue47
1 files changed, 0 insertions, 47 deletions
diff --git a/packages/client/src/components/number-diff.vue b/packages/client/src/components/number-diff.vue
deleted file mode 100644
index e7d4a5472a..0000000000
--- a/packages/client/src/components/number-diff.vue
+++ /dev/null
@@ -1,47 +0,0 @@
-<template>
-<span class="ceaaebcd" :class="{ isPlus, isMinus, isZero }">
- <slot name="before"></slot>{{ isPlus ? '+' : '' }}{{ number(value) }}<slot name="after"></slot>
-</span>
-</template>
-
-<script lang="ts">
-import { computed, defineComponent } from 'vue';
-import number from '@/filters/number';
-
-export default defineComponent({
- props: {
- value: {
- type: Number,
- required: true,
- },
- },
-
- setup(props) {
- const isPlus = computed(() => props.value > 0);
- const isMinus = computed(() => props.value < 0);
- const isZero = computed(() => props.value === 0);
- return {
- isPlus,
- isMinus,
- isZero,
- number,
- };
- },
-});
-</script>
-
-<style lang="scss" scoped>
-.ceaaebcd {
- &.isPlus {
- color: var(--success);
- }
-
- &.isMinus {
- color: var(--error);
- }
-
- &.isZero {
- opacity: 0.5;
- }
-}
-</style>