mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 19:36:44 +03:00
24 lines
542 B
TypeScript
24 lines
542 B
TypeScript
'use strict';
|
|
|
|
import {RedocComponent, BaseComponent, SchemaManager} from '../base';
|
|
|
|
@RedocComponent({
|
|
selector: 'api-logo',
|
|
styleUrls: ['./api-logo.css'],
|
|
templateUrl: './api-logo.html'
|
|
})
|
|
export class ApiLogo extends BaseComponent {
|
|
data:any = {};
|
|
|
|
constructor(schemaMgr:SchemaManager) {
|
|
super(schemaMgr);
|
|
}
|
|
|
|
prepareModel() {
|
|
let logoInfo = this.componentSchema.info['x-logo'];
|
|
if (!logoInfo) return;
|
|
this.data.imgUrl = logoInfo.url;
|
|
this.data.bgColor = logoInfo.backgroundColor || 'transparent';
|
|
}
|
|
}
|