Skip to content

Commit 52d3167

Browse files
Adrian Faciuvalorkin
authored andcommitted
feat(dropdown): optionally add dropdown-toggle class (#772)
1 parent bd4cc96 commit 52d3167

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

components/dropdown/dropdown-toggle.directive.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export class DropdownToggleDirective implements OnInit {
1414
@Input() public isDisabled:boolean = false;
1515

1616
@HostBinding('class.dropdown-toggle')
17+
@Input() public addToggleClass:boolean = false;
18+
1719
@HostBinding('attr.aria-haspopup')
1820
public addClass:boolean = true;
1921

components/dropdown/readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export class DropdownToggle implements OnInit {
3737
@HostBinding('class.disabled')
3838
@Input() public isDisabled:boolean = false;
3939

40+
@HostBinding('class.dropdown-toggle')
41+
@Input() public addToggleClass:boolean = false;
42+
4043
@HostBinding('attr.aria-expanded')
4144
public get isOpen() {}
4245
@HostListener('click', ['$event'])
@@ -61,3 +64,4 @@ export const DROPDOWN_DIRECTIVES: Array<any> = [Dropdown, DropdownMenu, Dropdown
6164

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

0 commit comments

Comments
 (0)