Here is how my component looks like
<template>
<div v-html="someHtml"></div>
</template>
<script>
export default {
name: "test",
props: {
someHtml: String,
},
}
</script>
The way component is being used in storybooks:
export const testtest = () => ({
components: {test},
props: {
someHtml: {default: text('somehtml', '<a href="link" class="link text-theme">see data</a>')}
},
template: `
<test v-bind="$props"/>
`,
});
Output is always html raw string like this ==>
<a href="link" class="link text-theme">see data</a>
Docs are clear about the usage, and still it is not working for me.
I am passing raw html as a prop. When I am using raw html from vue js data, then it is working and is able to "parse" html string and renders it properly.