-
Notifications
You must be signed in to change notification settings - Fork 889
feat(CommandPalette)!: add trailing-icon
to the input and actions slot
#4397
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
base: v4
Are you sure you want to change the base?
Conversation
✅ Deployed ui3
|
commit: |
input-trailing-icon
prop and slottrailing-icon
to the input and actions slot
trailing-icon
to the input and actions slottrailing-icon
to the input and actions slot
:name="trailingIcon || appConfig.ui.icons.chevronRight" | ||
:class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, item.ui?.itemTrailingIcon] })" | ||
:name="childrenIcon || appConfig.ui.icons.chevronRight" | ||
:class="ui.childrenIcon({ class: [props.ui?.childrenIcon, item.ui?.childrenIcon] })" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep using ui.itemTrailingIcon
here? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because in this case the icon only appears when the item has children, with itemTrailingIcon
you'd think there'd be an icon for each item I think 🤔
actions: '', | ||
close: '', | ||
back: 'p-0', | ||
trailingIcon: 'shrink-0 size-5 text-dimmed', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed.
itemLeadingChip: 'shrink-0 size-5', | ||
itemLeadingChipSize: 'md', | ||
itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', | ||
childrenIcon: 'shrink-0 size-5', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed.
|
||
<template v-if="close || !!slots.close" #trailing> | ||
<template v-if="trailingIcon || close || !!slots.close || !!slots.actions" #trailing> | ||
<UIcon v-if="trailingIcon" :name="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the ui.trailingIcon
from the UInput component here not from the CommandPalette. I'll make a PR to expose it (related to #4823)
🔗 Linked issue
Resolves #3880
❓ Type of change
📚 Description