Add notice showing that copy happened

This commit is contained in:
Ajay
2022-06-06 20:41:15 -04:00
parent 5545a516be
commit 32052c17f1
9 changed files with 296 additions and 247 deletions

View File

@@ -20,12 +20,17 @@ export interface TextBox {
export interface NoticeOptions {
title: string,
referenceNode?: HTMLElement,
textBoxes?: TextBox[],
buttons?: ButtonListener[],
fadeIn?: boolean,
timed?: boolean
style?: React.CSSProperties;
extraClass?: string;
maxCountdownTime?: () => number;
dontPauseCountdown?: boolean;
hideLogo?: boolean;
hideRightInfo?: boolean;
}
export default class GenericNotice {
@@ -42,7 +47,7 @@ export default class GenericNotice {
this.contentContainer = contentContainer;
const referenceNode = utils.findReferenceNode();
const referenceNode = options.referenceNode ?? utils.findReferenceNode();
this.noticeElement = document.createElement("div");
this.noticeElement.id = "sponsorSkipNoticeContainer" + idSuffix;
@@ -62,6 +67,10 @@ export default class GenericNotice {
ref={this.noticeRef}
style={options.style}
extraClass={options.extraClass}
maxCountdownTime={options.maxCountdownTime}
dontPauseCountdown={options.dontPauseCountdown}
hideLogo={options.hideLogo}
hideRightInfo={options.hideRightInfo}
closeListener={() => this.close()} >
{this.getMessageBox(this.idSuffix, options.textBoxes)}