File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
packages/docs/.vitepress/theme/components Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change 31
31
<script setup lang="ts">
32
32
import sponsors from ' ./sponsors.json'
33
33
import { computed } from ' vue'
34
- import type { PropType } from ' vue'
35
34
import { useData } from ' vitepress'
36
35
37
- const { isDark } = useData ()
36
+ interface Props {
37
+ name: ' Gold' | ' Platinum' | ' Silver' | ' Bronze'
38
+ size? : number | string
39
+ }
38
40
39
- const props = defineProps ({
40
- name: {
41
- type: String as PropType <' Gold' | ' Platinum' | ' Silver' | ' Bronze' >,
42
- required: true ,
43
- },
44
- size: {
45
- type: [Number , String ],
46
- default: 140 ,
47
- },
41
+ const props = withDefaults (defineProps <Props >(), {
42
+ size: 140 ,
48
43
})
49
44
45
+ const { isDark } = useData ()
46
+
50
47
const list = computed (() =>
51
48
sponsors [props .name .toLowerCase ()].map ((sponsor ) => ({
52
49
... sponsor ,
You can’t perform that action at this time.
0 commit comments