-
Notifications
You must be signed in to change notification settings - Fork 223
feat(modal): adiciona suporte a ícone nas ações do modal #2668
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: master
Are you sure you want to change the base?
Conversation
015eb6c to
5bd2ce6
Compare
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.
Pull Request Overview
This pull request adds icon support to modal action buttons by introducing an icon property to the PoModalAction interface. This enhancement allows developers to display icons alongside button labels in modal dialogs.
- Added
iconproperty toPoModalActioninterface with comprehensive documentation - Updated modal component template to bind icon properties to action buttons
- Enhanced sample/labs component to demonstrate icon functionality with new input fields
- Improved documentation consistency between
PoButtonandPoModalActionfor icon usage
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| po-modal-action.interface.ts | Added optional icon property with documentation for string and TemplateRef support |
| po-modal.component.html | Bound [p-icon] property to both primary and secondary action buttons |
| sample-po-modal-labs.component.ts | Added primaryActionIcon and secondaryActionIcon properties, updated openModal() and restore() methods, reordered secondary action options array |
| sample-po-modal-labs.component.html | Added input fields for primary and secondary action icons, adjusted responsive grid classes for layout consistency |
| po-button-base.component.ts | Minor documentation improvements for icon property description and wording consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/ui/src/lib/components/po-modal/po-modal-action.interface.ts
Outdated
Show resolved
Hide resolved
...src/lib/components/po-modal/samples/sample-po-modal-labs/sample-po-modal-labs.component.html
Outdated
Show resolved
Hide resolved
5bd2ce6 to
b8c5f0c
Compare
O componente po-modal não permitia exibir ícones nos botões de ação. Adiciona a propriedade `icon` na interface `PoModalAction` e vincula `[p-icon]` nos botões primário e secundário do template do modal. Fixes DTHFUI-11656, DTHFUI-12113
b8c5f0c to
fb7a79a
Compare
Atualiza o valor dos tokens: - ICON_SORT - ICON_SORT_ASC - ICON_SORT_DESC Adiciona os tokens: - ICON_ARROW_ARC_LEFT - ICON_PLUS - ICON_PROHIBIT Fixes DTHFUI-12113
4b96b7c to
b3c7f9a
Compare
O componente po-modal não permitia exibir ícones nos botões de ação. Adiciona a propriedade
iconna interfacePoModalActione vincula[p-icon]nos botões primário e secundário do template do modal.modal
DTHFUI-11656, DTHFUI-12113
PR Checklist [Revisor]
Qual o comportamento atual?

Modal não permite adição de ícones nos botões de ação primária/secundária:
Qual o novo comportamento?

Modal aceita icon na interface PoModalAction:
Simulação