2015-12-21 00:34:20 +03:00
|
|
|
'use strict';
|
|
|
|
|
2016-06-22 21:17:48 +03:00
|
|
|
import {RedocComponent, BaseComponent, SpecManager} from '../base';
|
2015-12-21 00:34:20 +03:00
|
|
|
|
|
|
|
@RedocComponent({
|
|
|
|
selector: 'api-logo',
|
2016-05-25 18:34:31 +03:00
|
|
|
styleUrls: ['./api-logo.css'],
|
|
|
|
templateUrl: './api-logo.html'
|
2015-12-21 00:34:20 +03:00
|
|
|
})
|
2016-05-06 00:48:41 +03:00
|
|
|
export class ApiLogo extends BaseComponent {
|
2016-07-20 11:07:08 +03:00
|
|
|
logo:any = {};
|
2016-06-13 20:54:24 +03:00
|
|
|
|
2016-06-23 17:36:38 +03:00
|
|
|
constructor(specMgr:SpecManager) {
|
|
|
|
super(specMgr);
|
2015-12-21 00:34:20 +03:00
|
|
|
}
|
|
|
|
|
2016-07-20 11:07:08 +03:00
|
|
|
init() {
|
2015-12-21 00:34:20 +03:00
|
|
|
let logoInfo = this.componentSchema.info['x-logo'];
|
|
|
|
if (!logoInfo) return;
|
2016-07-20 11:07:08 +03:00
|
|
|
this.logo.imgUrl = logoInfo.url;
|
|
|
|
this.logo.bgColor = logoInfo.backgroundColor || 'transparent';
|
2015-12-21 00:34:20 +03:00
|
|
|
}
|
|
|
|
}
|