Added basic react submission confirmation notice

This commit is contained in:
Ajay Ramachandran
2020-03-11 17:50:50 -04:00
parent a02aef591e
commit a182354254
10 changed files with 307 additions and 38 deletions

View File

@@ -0,0 +1,46 @@
import * as React from "react";
export interface SponsorTimeEditProps {
index: number,
idSuffix: string,
// Contains functions and variables from the content script needed by the skip notice
contentContainer: () => any;
}
export interface SponsorTimeEditState {
}
class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, SponsorTimeEditState> {
constructor(props: SponsorTimeEditProps) {
super(props);
}
render() {
return (
<>
<div id={"sponsorTimesContainer" + this.props.index + this.props.idSuffix}
className="sponsorTime">
{this.props.contentContainer().sponsorTimesSubmitting[this.props.index][0]
+ " to " + this.props.contentContainer().sponsorTimesSubmitting[this.props.index][1]}
</div>
<span id={"sponsorTimeDeleteButton" + this.props.index + this.props.idSuffix}>
{chrome.i18n.getMessage("delete")}
</span>
<span id={"sponsorTimePreviewButton" + this.props.index + this.props.idSuffix}>
{chrome.i18n.getMessage("preview")}
</span>
<span id={"sponsorTimeEditButton" + this.props.index + this.props.idSuffix}>
{chrome.i18n.getMessage("edit")}
</span>
</>
);
}
}
export default SponsorTimeEditComponent;