-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add prop(s) to hide popconfirm actions #770
Comments
Won't do, they are two things. If you need it it's very easy to encapsulate one. |
🤔 To add an icon to a popover, simply using an <template>
<n-popover class="n-popconfirm" show>
<template #trigger>I have a popover!</template>
<div class="n-popconfirm__body">
<div class="n-popconfirm__icon">
<n-icon class="n-base-icon"><!-- icon --></n-icon>
</div>
Popover text
</div>
</n-popover>
</template> but this feels like a hack. I can use CSS to add a margin, but is there another way to get the icon to look decent in a popover? Am I missing something that is already part of the API? I would like to use Naive UI's API and styling instead of custom styling as much as possible, to keep things consistent. |
I think we may provide a way to hide popconfirm's action. Layout features can be endless, that's why I don't like to make layouts builtin unless they are quite common. |
This would help a lot! Should I change the title of this issue to "Add prop(s) to hide popconfirm actions"? Just a thought, not a request: |
Yes I think you can do it. |
Actually they are nearly the same, popconfirm just wrap popover with some extra DOM. It's possible to make it like
However I won't do that. It won't make user's DX better but add a lot of work in library development. |
This function solves the problem (这个功能解决的问题)
More consistency between Popconfirms and Popovers
Expected API (期望的 API)
The text was updated successfully, but these errors were encountered: