-
Notifications
You must be signed in to change notification settings - Fork 25
/
Giscus.vue
57 lines (53 loc) · 1.06 KB
/
Giscus.vue
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import type {
AvailableLanguage,
BooleanString,
InputPosition,
Loading,
Mapping,
Repo,
Theme,
} from './types';
defineProps<{
id?: string;
host?: string;
repo: Repo;
repoId: string;
category?: string;
categoryId?: string;
mapping: Mapping;
term?: string;
theme?: Theme;
strict?: BooleanString;
reactionsEnabled?: BooleanString;
emitMetadata?: BooleanString;
inputPosition?: InputPosition;
lang?: AvailableLanguage;
loading?: Loading;
}>();
const mounted = ref(false);
onMounted(() => {
import('giscus').then(() => (mounted.value = true));
});
</script>
<template>
<giscus-widget
v-if="mounted"
:id="id"
:host="host"
:repo="repo"
:repoid="repoId"
:category="category"
:categoryid="categoryId"
:mapping="mapping"
:term="term"
:strict="strict"
:reactionsenabled="reactionsEnabled"
:emitmetadata="emitMetadata"
:inputposition="inputPosition"
:theme="theme"
:lang="lang"
:loading="loading"
/>
</template>