Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom icons #29

Open
vpratfr opened this issue Jun 14, 2022 · 0 comments
Open

Custom icons #29

vpratfr opened this issue Jun 14, 2022 · 0 comments

Comments

@vpratfr
Copy link

vpratfr commented Jun 14, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant