45
45
Slot for the copy button inside the code block of the component.
46
46
</td >
47
47
</tr >
48
- <!-- < tr>
48
+ <tr >
49
49
<td colspan =" 2" >
50
50
<VCodeBlock
51
51
:code =" copyButtonSlotsCode"
52
- :highlightjs="codeBlockSettings.plugin === 'highlightjs'"
52
+ :highlightjs =" selectedLibrary.id === 'highlightjs'"
53
53
lang =" typescript"
54
- :prismjs="codeBlockSettings.plugin === 'prismjs'"
55
- :theme="codeBlockSettings.theme "
54
+ :prismjs =" selectedLibrary.id === 'prismjs'"
55
+ :theme =" selectedTheme "
56
56
/>
57
57
</td >
58
- </tr> -->
58
+ </tr >
59
59
60
60
<!-- ================================================== Label -->
61
61
<tr
76
76
Slot for the label of the component.
77
77
</td >
78
78
</tr >
79
- <!-- < tr>
79
+ <tr >
80
80
<td colspan =" 2" >
81
81
<VCodeBlock
82
82
:code =" labelSlotsCode"
83
- :highlightjs="codeBlockSettings.plugin === 'highlightjs'"
83
+ :highlightjs =" selectedLibrary.id === 'highlightjs'"
84
84
lang =" typescript"
85
- :prismjs="codeBlockSettings.plugin === 'prismjs'"
86
- :theme="codeBlockSettings.theme "
85
+ :prismjs =" selectedLibrary.id === 'prismjs'"
86
+ :theme =" selectedTheme "
87
87
/>
88
88
</td >
89
- </tr> -->
89
+ </tr >
90
90
91
91
<!-- ================================================== Tabs -->
92
92
<tr
107
107
Slot for the tabs of the component.
108
108
</td >
109
109
</tr >
110
- <!-- < tr>
110
+ <tr >
111
111
<td colspan =" 2" >
112
112
<VCodeBlock
113
113
:code =" tabsSlotsCode"
114
- :highlightjs="codeBlockSettings.plugin === 'highlightjs'"
114
+ :highlightjs =" selectedLibrary.id === 'highlightjs'"
115
115
lang =" typescript"
116
- :prismjs="codeBlockSettings.plugin === 'prismjs'"
117
- :theme="codeBlockSettings.theme "
116
+ :prismjs =" selectedLibrary.id === 'prismjs'"
117
+ :theme =" selectedTheme "
118
118
/>
119
119
</td >
120
- </tr> -->
120
+ </tr >
121
121
</tbody >
122
122
</v-table >
123
123
</v-card >
127
127
128
128
<script setup>
129
129
import { useTheme } from ' vuetify' ;
130
- // import { useCoreStore } from '@/stores/index';
131
130
132
- // const props = defineProps({
133
- // codeBlockOptions: {
134
- // required: true,
135
- // type: Object,
136
- // },
137
- // });
138
131
139
- // const codeBlockSettings = computed(() => props.codeBlockOptions);
140
- // const store = useCoreStore();
132
+ const selectedLibrary = inject (' selectedLibrary' );
133
+ const selectedTheme = inject (' selectedTheme' );
134
+
141
135
const classes = inject (' classes' );
142
136
const theme = useTheme ();
143
137
const isDark = ref (true );
@@ -151,15 +145,20 @@ const rowClass = computed(() => {
151
145
return isDark .value ? ' bg-grey-darken-3' : ' bg-grey-lighten-3' ;
152
146
});
153
147
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
+ }` ;
163
162
164
163
165
164
</script >
0 commit comments