2015-12-21 00:34:20 +03:00
|
|
|
'use strict';
|
|
|
|
|
2016-05-25 18:34:31 +03:00
|
|
|
import {RedocComponent, BaseComponent, SchemaManager} 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-05-25 18:34:31 +03:00
|
|
|
data:any = {};
|
2016-06-13 20:54:24 +03:00
|
|
|
|
2016-05-25 18:34:31 +03:00
|
|
|
constructor(schemaMgr:SchemaManager) {
|
2015-12-21 00:34:20 +03:00
|
|
|
super(schemaMgr);
|
|
|
|
}
|
|
|
|
|
|
|
|
prepareModel() {
|
|
|
|
let logoInfo = this.componentSchema.info['x-logo'];
|
|
|
|
if (!logoInfo) return;
|
|
|
|
this.data.imgUrl = logoInfo.url;
|
|
|
|
this.data.bgColor = logoInfo.backgroundColor || 'transparent';
|
|
|
|
}
|
|
|
|
}
|