Skip to content

Commit b9c699d

Browse files
Add binding props to other slots
1 parent 41565bc commit b9c699d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/plugin/VCodeBlock.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
:class="labelClasses"
1111
>
1212
<template v-if="slots.label">
13-
<slot name="label" />
13+
<slot
14+
name="label"
15+
v-bind="{
16+
copyCode,
17+
copyStatus,
18+
runCode,
19+
}"
20+
/>
1421
</template>
1522
<template v-else>{{ props.label }}</template>
1623
</div>
@@ -67,7 +74,12 @@
6774
@click="copyCode"
6875
>
6976
<template v-if="slots.copyButton">
70-
<slot name="copyButton" />
77+
<slot
78+
name="copyButton"
79+
v-bind="{
80+
copyStatus,
81+
}"
82+
/>
7183
</template>
7284
<template v-else>
7385
<StatusIcons

0 commit comments

Comments
 (0)