-
Notifications
You must be signed in to change notification settings - Fork 125
/
popover-dropdown.component.ts
50 lines (43 loc) · 1.25 KB
/
popover-dropdown.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Component, Host, Inject, Input, OnDestroy, ViewEncapsulation } from '@angular/core';
import { Subscription } from 'rxjs';
import { PopoverComponent } from '../popover.component';
/**
* A component used to enforce a certain layout for the popover. With additional styling
* ```html
* <fd-popover>
* <fd-dropdown>Dropdown</fd-dropdown>
* <fd-popover-body>Popover Body</fd-popover-body>
* </fd-popover>
* ```
*/
@Component({
selector: 'fd-dropdown-control',
host: {
class: 'fd-dropdown',
},
templateUrl: 'popover-dropdown.component.html',
encapsulation: ViewEncapsulation.None,
})
export class PopoverDropdownComponent {
/** Whether the popover should have an arrow. */
@Input()
noArrow: boolean = true;
/** Whether the popover is disabled. */
@Input()
disabled: boolean = false;
/** The glyph to display. */
@Input()
glyph: string;
/** The btnType to display. */
@Input()
btnType: string = '';
/** Whether the dropdown is in compact format. */
@Input()
compact: boolean = false;
/** Whether the dropdown is in a toolbar. */
@Input()
toolbar: boolean = false;
/** Whether the dropdown is opened. */
@Input()
isOpen: boolean = false;
}