Skip to content

Commit

Permalink
fix: use explicit props (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
genu authored Sep 12, 2024
1 parent 8a7c5b5 commit c1e1041
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/runtime/components/MDC.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
<MDCRenderer
v-if="body"
:tag="tag"
:tag="props.tag"
:class="props.class"
:body="body"
:data="data?.data"
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/prose/ProseA.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<NuxtLink
:href="href"
:target="target"
:href="props.href"
:target="props.target"
>
<slot />
</NuxtLink>
Expand All @@ -10,7 +10,7 @@
<script setup lang="ts">
import type { PropType } from 'vue'
defineProps({
const props = defineProps({
href: {
type: String,
default: ''
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/prose/ProseH1.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<h1 :id="id">
<h1 :id="props.id">
<a
v-if="generate"
:href="`#${id}`"
:href="`#${props.id}`"
>
<slot />
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/prose/ProseH2.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<h2 :id="id">
<h2 :id="props.id">
<a
v-if="id && generate"
:href="`#${id}`"
v-if="props.id && generate"
:href="`#${props.id}`"
>
<slot />
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/prose/ProseH3.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<h3 :id="id">
<h3 :id="props.id">
<a
v-if="id && generate"
:href="`#${id}`"
v-if="props.id && generate"
:href="`#${props.id}`"
>
<slot />
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/prose/ProseH4.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<h4 :id="id">
<h4 :id="props.id">
<a
v-if="id && generate"
:href="`#${id}`"
v-if="props.id && generate"
:href="`#${props.id}`"
>
<slot />
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/prose/ProseH5.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<h5 :id="id">
<h5 :id="props.id">
<a
v-if="id && generate"
:href="`#${id}`"
v-if="props.id && generate"
:href="`#${props.id}`"
>
<slot />
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/prose/ProseH6.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<h6 :id="id">
<h6 :id="props.id">
<a
v-if="id && generate"
:href="`#${id}`"
v-if="props.id && generate"
:href="`#${props.id}`"
>
<slot />
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/components/prose/ProseImg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<component
:is="imgComponent"
:src="refinedSrc"
:alt="alt"
:width="width"
:height="height"
:alt="props.alt"
:width="props.width"
:height="props.height"
/>
</template>

Expand Down

0 comments on commit c1e1041

Please sign in to comment.