-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2c9fc2
commit 9562105
Showing
7 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './po-button.component'; | ||
|
||
export * from './po-button.module'; | ||
|
||
export * from './po-button-type.enum'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
projects/ui/src/lib/components/po-button/po-button-type.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* @usedBy PoButtonComponent | ||
* | ||
* @description | ||
* | ||
* Enumeração que define os tipos possíveis para o `PoButtonComponent`. Estes tipos estão relacionados ao comportamento | ||
* do botão quando utilizado dentro de um formulário HTML. | ||
* | ||
* @example | ||
* No uso com o `PoButtonComponent`, a propriedade `p-type` pode ser utilizada para configurar o comportamento: | ||
* | ||
* ``` | ||
* <po-button p-label="Enviar" p-type="submit"></po-button> | ||
* <po-button p-label="Cancelar" p-type="button"></po-button> | ||
* <po-button p-label="Redefinir" p-type="reset"></po-button> | ||
* ``` | ||
*/ | ||
export enum PoButtonType { | ||
/** | ||
* Define o botão como do tipo `submit`. Quando clicado, o formulário é enviado automaticamente, | ||
* disparando o evento `submit`. | ||
*/ | ||
Submit = 'submit', | ||
|
||
/** | ||
* Define o botão como do tipo `button`. Este tipo de botão não possui comportamento padrão associado | ||
* e é utilizado principalmente para ações programáticas como cliques e disparos de eventos customizados. | ||
*/ | ||
Button = 'button', | ||
|
||
/** | ||
* Define o botão como do tipo `reset`. Quando clicado, redefine os campos do formulário ao qual pertence | ||
* para seus valores iniciais. | ||
*/ | ||
Reset = 'reset' | ||
} |
2 changes: 1 addition & 1 deletion
2
projects/ui/src/lib/components/po-button/po-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters