mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
32 lines
566 B
TypeScript
32 lines
566 B
TypeScript
import { YTNode } from '../helpers';
|
|
|
|
class MetadataBadge extends YTNode {
|
|
static type = 'MetadataBadge';
|
|
|
|
icon_type?: string;
|
|
style?: string;
|
|
label?: string;
|
|
tooltip?: string;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
|
|
if (data?.icon) {
|
|
this.icon_type = data.icon.iconType;
|
|
}
|
|
|
|
if (data?.style) {
|
|
this.style = data.style;
|
|
}
|
|
|
|
if (data?.label) {
|
|
this.style = data.label;
|
|
}
|
|
|
|
if (data?.tooltip || data?.iconTooltip) {
|
|
this.tooltip = data.tooltip || data.iconTooltip;
|
|
}
|
|
}
|
|
}
|
|
|
|
export default MetadataBadge; |