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

Icon attribute supports component type #6248

Closed
AAABingBing opened this issue Aug 19, 2024 · 1 comment
Closed

Icon attribute supports component type #6248

AAABingBing opened this issue Aug 19, 2024 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@AAABingBing
Copy link

Describe the bug

The current use of custom icons can only be via the slot method

<script setup>
import IconAccount from '~icons/line-md/account'
</script>

<template>
  <Button label="Test">
    <template #icon>
      <IconAccount />
    </template>
  </Button>
</template>

It is recommended that all components of the icon property support the component type

Just like this:

<script setup>
import IconAccount from '~icons/line-md/account'
</script>

<template>
  <Button label="Test" :icon="IconAccount" />
</template>

Reproducer

/

PrimeVue version

4.0.4

Vue version

4.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@AAABingBing AAABingBing added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 19, 2024
@tugcekucukoglu
Copy link
Member

Thanks for your suggestion. We currently recommend using icon slots for 3rd party icon libraries. The icon prop is designed for PrimeIcons. We can move it to discussions for more demand.

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