Skip to content

Conversation

@luiz-s-vasconcellos
Copy link
Contributor

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.

modal

DTHFUI-11656, DTHFUI-12113


PR Checklist [Revisor]

  • Padrão de Commit (Coeso, de acordo com o que está sendo realizado)
  • Código (Boas práticas, nome de variavéis/métodos, etc.)
  • Testes unitários (Cobre a situação implementada e coverage está mantido)
  • Documentação (Clara, objetiva e com exemplos caso necessário)
  • Samples (A implementação possui exemplo no Labs/Caso de uso)
  • Rodado em navegadores suportados (Chrome, FireFox, Edge)

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

Qual o novo comportamento?
Modal aceita icon na interface PoModalAction:
image

Simulação

Copy link

Copilot AI left a 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 icon property to PoModalAction interface 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 PoButton and PoModalAction for 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.

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants