File tree Expand file tree Collapse file tree 1 file changed +25
-24
lines changed
packages/docs/.vitepress/theme/components Expand file tree Collapse file tree 1 file changed +25
-24
lines changed Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import sponsors from ' ./sponsors.json'
3+ import { computed } from ' vue'
4+ import { useData } from ' vitepress'
5+
6+ const props = withDefaults (
7+ defineProps <{
8+ name: ' Gold' | ' Platinum' | ' Silver' | ' Bronze'
9+ size? : number | string
10+ }>(),
11+ {
12+ size: 140 ,
13+ }
14+ )
15+
16+ const { isDark } = useData ()
17+
18+ const list = computed (() =>
19+ sponsors [props .name .toLowerCase ()].map (sponsor => ({
20+ ... sponsor ,
21+ imgSrc: isDark .value ? sponsor .imgSrcDark : sponsor .imgSrcLight ,
22+ }))
23+ )
24+ </script >
25+
126<template >
227 <h3 >{{ name }} Sponsors</h3 >
328
2853 </p >
2954</template >
3055
31- <script setup lang="ts">
32- import sponsors from ' ./sponsors.json'
33- import { computed } from ' vue'
34- import { useData } from ' vitepress'
35-
36- interface Props {
37- name: ' Gold' | ' Platinum' | ' Silver' | ' Bronze'
38- size? : number | string
39- }
40-
41- const props = withDefaults (defineProps <Props >(), {
42- size: 140 ,
43- })
44-
45- const { isDark } = useData ()
46-
47- const list = computed (() =>
48- sponsors [props .name .toLowerCase ()].map ((sponsor ) => ({
49- ... sponsor ,
50- imgSrc: isDark .value ? sponsor .imgSrcDark : sponsor .imgSrcLight ,
51- }))
52- )
53- </script >
54-
5556<style scoped>
5657.sponsor_wrapper {
5758 padding : 5px ;
You can’t perform that action at this time.
0 commit comments