Zippy minor update

This commit is contained in:
Roman Hotsiy 2015-12-19 14:16:17 +02:00
parent 68286279f7
commit b275d5af65
2 changed files with 4 additions and 2 deletions

View File

@ -13,17 +13,19 @@ import {CORE_DIRECTIVES} from 'angular2/common';
styleUrls: ['./lib/common/components/Zippy/zippy.css'],
directives: [CORE_DIRECTIVES]
})
export class Zippy {
export default class Zippy {
constructor() {
this.type = 'general';
this.visible = false;
this.empty = false;
this.open = new EventEmitter();
this.close = new EventEmitter();
}
toggle() {
this.visible = !this.visible;
if (this.empty) return;
(this.visible) ? this.open.next() : this.close.next();
}
}

View File

@ -3,7 +3,7 @@
import {RedocComponent, BaseComponent} from '../base';
import JsonPointer from '../../utils/JsonPointer';
import JsonSchema from '../JsonSchema/json-schema';
import {Zippy} from '../../common/components/Zippy/zippy';
import Zippy from '../../common/components/Zippy/zippy';
import {statusCodeType} from '../../utils/helpers';
function isNumeric(n) {