Skip to content

Commit

Permalink
feat(dropdown): optionally add dropdown-toggle class (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Faciu authored and valorkin committed Jul 24, 2016
1 parent bd4cc96 commit 52d3167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/dropdown/dropdown-toggle.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export class DropdownToggleDirective implements OnInit {
@Input() public isDisabled:boolean = false;

@HostBinding('class.dropdown-toggle')
@Input() public addToggleClass:boolean = false;

@HostBinding('attr.aria-haspopup')
public addClass:boolean = true;

Expand Down
4 changes: 4 additions & 0 deletions components/dropdown/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export class DropdownToggle implements OnInit {
@HostBinding('class.disabled')
@Input() public isDisabled:boolean = false;

@HostBinding('class.dropdown-toggle')
@Input() public addToggleClass:boolean = false;

@HostBinding('attr.aria-expanded')
public get isOpen() {}
@HostListener('click', ['$event'])
Expand All @@ -61,3 +64,4 @@ export const DROPDOWN_DIRECTIVES: Array<any> = [Dropdown, DropdownMenu, Dropdown

### Dropdown toggle properties
- `isDisabled` (`?boolean=false`) - if `true` dropdown toggle will be disabled
- `addToggleClass` (`?boolean=false`) - if `true` the `dropdown-toggle` class will be added to the element

0 comments on commit 52d3167

Please sign in to comment.