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 3131<script setup lang="ts">
3232import sponsors from ' ./sponsors.json'
3333import { computed } from ' vue'
34- import type { PropType } from ' vue'
3534import { useData } from ' vitepress'
3635
37- const { isDark } = useData ()
36+ interface Props {
37+ name: ' Gold' | ' Platinum' | ' Silver' | ' Bronze'
38+ size? : number | string
39+ }
3840
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 ,
4843})
4944
45+ const { isDark } = useData ()
46+
5047const list = computed (() =>
5148 sponsors [props .name .toLowerCase ()].map ((sponsor ) => ({
5249 ... sponsor ,
You can’t perform that action at this time.
0 commit comments