@lawsafrica/law-widgets-vue
v2.2.1
Published
Vue specific wrapper for @lawsafrica/law-widgets
Downloads
7
Readme
@lawsafrica/law-widgets-vue
Vue3 component wrapper library built from @lawsafrica/law-widgets
Installation
npm
npm install @lawsafrica/law-widgets-vue
OR
yarn
yarn add @lawsafrica/law-widgets-vue
In the root of your vue project, create a file called vue.config.js
and add the following code:
module.exports = {
chainWebpack: config => config.resolve.symlinks(false)
}
Getting started
Here is a basic example of how to use LaTableOfContents
in Vue3:
<template>
<LaTableOfContents :items="items" />
</template>
<script>
import { LaTableOfContents } from "@lawsafrica/law-widgets-vue";
export default {
components: {
LaTableOfContents
},
data: () => ({
items: [
{
title: 'Entire document',
children: [
{
title: 'Ch. 1 – ',
children: [
{
title: 'Part B',
},
],
},
{
title: 'Ch. 2 – ',
},
],
}
]
})
}
</script>
List of components
View more examples of our various components.