Skip to content

Commit

Permalink
fix(Button): Aggiungi sia l'id sia il supporto all'attributo aria-dis…
Browse files Browse the repository at this point in the history
…abled ai bottoni relativi alla

ref #44
  • Loading branch information
Mario Traetta committed Jul 26, 2018
1 parent 42b52e4 commit edaeeef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<button type="button" [class]="buttonClass" [disabled]="disabled">
<button type="button" [id]="id" [class]="buttonClass" [disabled]="disabled" [attr.aria-disabled]="disabled">
<ng-content></ng-content>
</button>
10 changes: 7 additions & 3 deletions projects/design-angular-kit/src/lib/button/button.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Component, OnInit, Input, HostBinding, Output, HostListener } from '@angular/core';
import { ThemeColor, THEME_COLORS } from '../models/ThemeColor';
import { ButtonSize, BUTTON_SIZES } from '../models/ButtonSize';
import { Component, OnInit, Input } from '@angular/core';
import { ThemeColor } from '../models/ThemeColor';
import { ButtonSize } from '../models/ButtonSize';

let identifier = 0;

/**
* Un bottone con design bootstrap italia. Supporta tutte le funzionalità di un bottone HTML5.
Expand All @@ -12,6 +14,8 @@ import { ButtonSize, BUTTON_SIZES } from '../models/ButtonSize';
})
export class ButtonComponent implements OnInit {

id = `button-${identifier++}`;

/**
* Se presente, il pulsante avrà un effetto di trasparenza e non reagirà al click
*/
Expand Down

0 comments on commit edaeeef

Please sign in to comment.