4545 Slot for the copy button inside the code block of the component.
4646 </td >
4747 </tr >
48- <!-- < tr>
48+ <tr >
4949 <td colspan =" 2" >
5050 <VCodeBlock
5151 :code =" copyButtonSlotsCode"
52- :highlightjs="codeBlockSettings.plugin === 'highlightjs'"
52+ :highlightjs =" selectedLibrary.id === 'highlightjs'"
5353 lang =" typescript"
54- :prismjs="codeBlockSettings.plugin === 'prismjs'"
55- :theme="codeBlockSettings.theme "
54+ :prismjs =" selectedLibrary.id === 'prismjs'"
55+ :theme =" selectedTheme "
5656 />
5757 </td >
58- </tr> -->
58+ </tr >
5959
6060 <!-- ================================================== Label -->
6161 <tr
7676 Slot for the label of the component.
7777 </td >
7878 </tr >
79- <!-- < tr>
79+ <tr >
8080 <td colspan =" 2" >
8181 <VCodeBlock
8282 :code =" labelSlotsCode"
83- :highlightjs="codeBlockSettings.plugin === 'highlightjs'"
83+ :highlightjs =" selectedLibrary.id === 'highlightjs'"
8484 lang =" typescript"
85- :prismjs="codeBlockSettings.plugin === 'prismjs'"
86- :theme="codeBlockSettings.theme "
85+ :prismjs =" selectedLibrary.id === 'prismjs'"
86+ :theme =" selectedTheme "
8787 />
8888 </td >
89- </tr> -->
89+ </tr >
9090
9191 <!-- ================================================== Tabs -->
9292 <tr
107107 Slot for the tabs of the component.
108108 </td >
109109 </tr >
110- <!-- < tr>
110+ <tr >
111111 <td colspan =" 2" >
112112 <VCodeBlock
113113 :code =" tabsSlotsCode"
114- :highlightjs="codeBlockSettings.plugin === 'highlightjs'"
114+ :highlightjs =" selectedLibrary.id === 'highlightjs'"
115115 lang =" typescript"
116- :prismjs="codeBlockSettings.plugin === 'prismjs'"
117- :theme="codeBlockSettings.theme "
116+ :prismjs =" selectedLibrary.id === 'prismjs'"
117+ :theme =" selectedTheme "
118118 />
119119 </td >
120- </tr> -->
120+ </tr >
121121 </tbody >
122122 </v-table >
123123 </v-card >
127127
128128<script setup>
129129import { useTheme } from ' vuetify' ;
130- // import { useCoreStore } from '@/stores/index';
131130
132- // const props = defineProps({
133- // codeBlockOptions: {
134- // required: true,
135- // type: Object,
136- // },
137- // });
138131
139- // const codeBlockSettings = computed(() => props.codeBlockOptions);
140- // const store = useCoreStore();
132+ const selectedLibrary = inject (' selectedLibrary' );
133+ const selectedTheme = inject (' selectedTheme' );
134+
141135const classes = inject (' classes' );
142136const theme = useTheme ();
143137const isDark = ref (true );
@@ -151,15 +145,20 @@ const rowClass = computed(() => {
151145 return isDark .value ? ' bg-grey-darken-3' : ' bg-grey-lighten-3' ;
152146});
153147
154- // const copyButtonSlotsCode = `{
155-
156- // }`;
157- // const labelSlotsCode = `{
158-
159- // }`;
160- // const tabsSlotsCode = `{
161-
162- // }`;
148+ const copyButtonSlotsCode = ` {
149+ copyCode: () => void,
150+ copyStatus: Ref<string>,
151+ runCode: () => void,
152+ }` ;
153+ const labelSlotsCode = ` {
154+ copyCode: () => void,
155+ copyStatus: Ref<string>,
156+ }` ;
157+ const tabsSlotsCode = ` {
158+ copyCode: () => void,
159+ copyStatus: Ref<string>,
160+ runCode: () => void,
161+ }` ;
163162
164163
165164 </script >
0 commit comments