blob: b16df89e83bd332e07fea1af5964cf83afaef8e0 (
plain)
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
|
/**
* Created by M.S.BIT on 26/04/2018.
*/
import {Component, Input, Output, EventEmitter} from "@angular/core";
import {Placement} from "../common/enums";
import template from './accordion.component.html';
@Component({
selector: 'sdc-accordion',
template: template,
})
export class AccordionComponent {
@Input('arrow-direction') arrowDirection: Placement;
@Input('css-class') customCSSClass: string;
@Input('title') title: string;
@Input('open') open: boolean;
@Output('accordionChanged') changed = new EventEmitter<boolean>();
public accordionArrowDirection = Placement;
public toggleAccordion(){
this.open = !this.open;
this.changed.emit(this.open);
}
}
|