Skip to content

Commit

Permalink
docs: corrected types on doc snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Sep 2, 2024
1 parent 7e02959 commit f4491e8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ You can override the default resolvers by passing a `resolver` prop to the `Stor

```html
<script setup>
import { StoryblokRichText, BlockTypes, StoryblokRichTextNode } from "@storyblok/vue";
import { type VNode, h } from "vue";
import { StoryblokRichText, BlockTypes, MarkTypes, type StoryblokRichTextNode } from "@storyblok/vue";
import { RouterLink } from "vue-router";
import CodeBlok from "./components/CodeBlok.vue";
Expand Down Expand Up @@ -183,12 +184,13 @@ Or you can have more control by using the `useStoryblokRichText` composable:
```html
<script setup>
import { useStoryblokRichText } from "@storyblok/vue";
import { type VNode, h } from "vue";
import { useStoryblokRichText, BlockTypes, MarkTypes, type StoryblokRichTextNode } from "@storyblok/vue";
import { RouterLink } from "vue-router";
const resolvers = {
// RouterLink example:
[MarkTypes.LINK]: (node: Node<VNode>) => {
[MarkTypes.LINK]: (node: StoryblokRichTextNode<VNode>) => {
return node.attrs?.linktype === 'STORY'
? h(RouterLink, {
to: node.attrs?.href,
Expand Down

0 comments on commit f4491e8

Please sign in to comment.