Skip to content

Commit 1c7fb8a

Browse files
felipepetucorafaellmarques
authored andcommitted
feat(tag): implementa variação de status neutral
1 parent db37399 commit 1c7fb8a

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

projects/ui/src/lib/components/po-tag/enums/po-tag-type.enum.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ export enum PoTagType {
1212
/** Informativo ou explicativo. */
1313
Info = 'info',
1414

15-
/** Confirmação, resultados positivos ou êxito */
15+
/** Confirmação, resultados positivos ou êxito. */
1616
Success = 'success',
1717

1818
/** Aviso ou advertência. */
19-
Warning = 'warning'
19+
Warning = 'warning',
20+
21+
/** De uso geral, quando os tipos Info, Warning, Success e Danger não atendem a necessidade. */
22+
Neutral = 'neutral'
2023
}

projects/ui/src/lib/components/po-tag/po-tag-base.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ export class PoTagBaseComponent {
268268
* - `success`: cor verde utilizada para simbolizar sucesso ou êxito.
269269
* - `warning`: cor amarela que representa aviso ou advertência.
270270
* - `danger`: cor vermelha para erro ou aviso crítico.
271-
* - `info`: cor cinza escuro que caracteriza conteúdo informativo.
271+
* - `info`: cor azul claro que caracteriza conteúdo informativo.
272+
* - `neutral`: cor cinza claro para uso geral.
272273
*
273274
* > Quando esta propriedade for definida, irá sobrepor a definição de `p-color` e `p-icon` somente será exibido caso seja `true`.
274275
*

projects/ui/src/lib/components/po-tag/po-tag.component.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,14 @@ describe('PoTagComponent:', () => {
326326
expect(nativeElement.querySelector('.po-tag-warning')).toBeTruthy();
327327
});
328328

329+
it('should add `po-tag-neutral` if type is `PoTagType.Neutral`.', () => {
330+
component.type = PoTagType.Neutral;
331+
332+
fixture.detectChanges();
333+
334+
expect(nativeElement.querySelector('.po-tag-neutral')).toBeTruthy();
335+
});
336+
329337
it('should add `PoTagIcon.Danger` if type is `PoTagType.Danger and `icon` is true`.', () => {
330338
component.type = PoTagType.Danger;
331339
component.icon = true;

projects/ui/src/lib/components/po-tag/samples/sample-po-tag-labs/sample-po-tag-labs.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export class SamplePoTagLabsComponent implements OnInit {
6161
{ label: 'Info', value: PoTagType.Info },
6262
{ label: 'Danger', value: PoTagType.Danger },
6363
{ label: 'Success', value: PoTagType.Success },
64-
{ label: 'Warning', value: PoTagType.Warning }
64+
{ label: 'Warning', value: PoTagType.Warning },
65+
{ label: 'Neutral', value: PoTagType.Neutral }
6566
];
6667

6768
ngOnInit() {

0 commit comments

Comments
 (0)