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

Button: Icon position prop does not work as expected when use slot #5623

Open
manjindersinghsarkaria opened this issue Apr 19, 2024 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@manjindersinghsarkaria
Copy link

Describe the bug

When using a slot to provide an icon, the iconPos prop does not have any effect. I noticed this behavior while using Font Awesome icons. Even when testing with PrimeVue icons, the position remained unchanged. Below is the code snippet, and I'll also attach a screenshot for reference.
Screenshot_4

<script setup></script>

Reproducer

https://stackblitz.com/edit/voekuq?file=src%2FApp.vue

PrimeVue version

3.51.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

Add an icon inside the button using the icon slot, and give a position right via prop called iconPos, and you will see that the icon remain on left.

Expected behavior

Icon position should moved to right when the iconPos is right

@manjindersinghsarkaria manjindersinghsarkaria added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 19, 2024
@Rekl0w
Copy link

Rekl0w commented Apr 22, 2024

https://stackblitz.com/edit/voekuq-khdt1t?file=src%2FApp.vue

Try this, this should do.

@manjindersinghsarkaria
Copy link
Author

@Rekl0w
In the PrimeVue component library, when using a slot to provide an icon instead of utilizing PrimeIcons, the iconPos prop does not function as expected. This issue arises specifically when utilizing the icon slot with non-PrimeIcons, such as Font Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants