redoc/lib/components/ApiLogo/api-logo.ts
Roman Hotsiy 003fba8651
Refactoring
Rename schemaMgr to specMgr
fix error logs in tests
2016-06-23 17:46:10 +03:00

24 lines
532 B
TypeScript

'use strict';
import {RedocComponent, BaseComponent, SpecManager} from '../base';
@RedocComponent({
selector: 'api-logo',
styleUrls: ['./api-logo.css'],
templateUrl: './api-logo.html'
})
export class ApiLogo extends BaseComponent {
data:any = {};
constructor(specMgr:SpecManager) {
super(specMgr);
}
prepareModel() {
let logoInfo = this.componentSchema.info['x-logo'];
if (!logoInfo) return;
this.data.imgUrl = logoInfo.url;
this.data.bgColor = logoInfo.backgroundColor || 'transparent';
}
}