mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-30 04:23:44 +03:00
24 lines
524 B
TypeScript
24 lines
524 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 {
|
|
logo:any = {};
|
|
|
|
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';
|
|
}
|
|
}
|