redoc/lib/components/ApiLogo/api-logo.ts

24 lines
524 B
TypeScript
Raw Normal View History

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