bootstrap-vue-treeview
bootstrap-vue-treeview copied to clipboard
Custom icons
Hi,
The component is great, but we would like to change the icons to fit our branding.
Would it be posssible to add a way to customize that? Some slots would do the trick I think, to replace the hardcoded SVG.
<svg width="12"
height="12"
@click.prevent="toggle"
class="tree-node-icon"
v-if="hasChildren">
<path d="M2 1 L10 6 L2 11 Z"
class="svg-icon"/>
</svg>
Could be something like that :
<div v-if="hasChildren" @click.prevent="toggle">
<slot name="expand-icon">
<svg width="12" height="12" class="tree-node-icon">
<path d="M2 1 L10 6 L2 11 Z" class="svg-icon"/>
</svg>
</slot>
</div>
Same could be done to allow for a fully custom label icon