2015-12-21 00:34:20 +03:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import {RedocComponent, BaseComponent} from '../base';
|
|
|
|
|
|
|
|
@RedocComponent({
|
|
|
|
selector: 'api-logo',
|
|
|
|
styleUrls: ['./lib/components/ApiLogo/api-logo.css'],
|
|
|
|
templateUrl: './lib/components/ApiLogo/api-logo.html'
|
|
|
|
})
|
2016-02-11 14:38:44 +03:00
|
|
|
export default class ApiLogo extends BaseComponent {
|
2015-12-21 00:34:20 +03:00
|
|
|
constructor(schemaMgr) {
|
|
|
|
super(schemaMgr);
|
|
|
|
}
|
|
|
|
|
|
|
|
prepareModel() {
|
|
|
|
this.data = {};
|
|
|
|
let logoInfo = this.componentSchema.info['x-logo'];
|
|
|
|
if (!logoInfo) return;
|
|
|
|
this.data.imgUrl = logoInfo.url;
|
|
|
|
this.data.bgColor = logoInfo.backgroundColor || 'transparent';
|
|
|
|
}
|
|
|
|
}
|