feat: finalize comment section nodes (#280)

* fix: comment translation proto missing channel id

* feat: finalize nodes

* docs: update API ref

* chore: update tests
This commit is contained in:
LuanRT
2023-01-09 08:14:31 -03:00
committed by GitHub
parent 56e6e23453
commit dca61c3a22
28 changed files with 539 additions and 146 deletions

View File

@@ -0,0 +1,25 @@
import Text from '../misc/Text';
import { YTNode } from '../../helpers';
class PdgCommentChip extends YTNode {
static type = 'PdgCommentChip';
text: Text;
color_pallette: {
background_color: string;
foreground_title_color: string;
};
icon_type: string;
constructor(data: any) {
super();
this.text = new Text(data.chipText);
this.color_pallette = {
background_color: data.chipColorPalette?.backgroundColor,
foreground_title_color: data.chipColorPalette?.foregroundTitleColor
};
this.icon_type = data.chipIcon?.iconType;
}
}
export default PdgCommentChip;