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

Some component doesn't have a UI prop #2094

Closed
3 tasks
GMartigny opened this issue Aug 30, 2024 · 2 comments
Closed
3 tasks

Some component doesn't have a UI prop #2094

GMartigny opened this issue Aug 30, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@GMartigny
Copy link

Description

Hi,

The Icon component doesn't have a UI prop like most components. This prevent users from applying a CSS class to all instances of Icon. IMO, this is a really small harmless change, that would align Icons with the rest of the library.

As of v2.18.4, this is true for:

  • Form
  • Icon
  • Link

As a workaround, it's always possible to create a wrapper component.

<script setup>
defineProps(['name', 'ui']);
</script>

<template>
  <u-icon :name="name" :class="ui.base" />
</template>

By the way, the doc state that "Each component has a ui prop". Which is not true then.

Additional context

No response

@GMartigny GMartigny added enhancement New feature or request triage labels Aug 30, 2024
@GMartigny
Copy link
Author

GMartigny commented Sep 3, 2024 via email

@benjamincanac
Copy link
Member

We won't be implementing this in v2 or v3, the ui prop is meant to target multiple slots within a component. It's unnecessary for components having a single root div for example. You can use the app.config.ts to target all components at the same time.

@benjamincanac benjamincanac closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants