Colour time inputs as well

This commit is contained in:
Ajay
2025-10-03 02:29:11 -04:00
parent 068307f98a
commit e1b18944bb

View File

@@ -123,6 +123,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
style.marginTop = "15px";
}
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
// Create time display
let timeDisplay: JSX.Element;
const timeDisplayStyle: React.CSSProperties = {};
@@ -151,7 +153,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<input id={"submittingTime0" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput"
type="text"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.sponsorTimeEdits[0] ?? ""}
onKeyDown={(e) => e.stopPropagation()}
onKeyUp={(e) => e.stopPropagation()}
@@ -168,7 +170,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
<input id={"submittingTime1" + this.idSuffix}
className="sponsorTimeEdit sponsorTimeEditInput"
type="text"
style={{color: "inherit", backgroundColor: "inherit"}}
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
value={this.state.sponsorTimeEdits[1] ?? ""}
onKeyDown={(e) => e.stopPropagation()}
onKeyUp={(e) => e.stopPropagation()}
@@ -205,8 +207,6 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
);
}
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
return (
<div id={"sponsorTimeEditContainer" + this.idSuffix} style={style}>