Skip to content

Commit e1b1894

Browse files
committed
Colour time inputs as well
1 parent 068307f commit e1b1894

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/SponsorTimeEditComponent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
123123
style.marginTop = "15px";
124124
}
125125

126+
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
127+
126128
// Create time display
127129
let timeDisplay: JSX.Element;
128130
const timeDisplayStyle: React.CSSProperties = {};
@@ -151,7 +153,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
151153
<input id={"submittingTime0" + this.idSuffix}
152154
className="sponsorTimeEdit sponsorTimeEditInput"
153155
type="text"
154-
style={{color: "inherit", backgroundColor: "inherit"}}
156+
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
155157
value={this.state.sponsorTimeEdits[0] ?? ""}
156158
onKeyDown={(e) => e.stopPropagation()}
157159
onKeyUp={(e) => e.stopPropagation()}
@@ -168,7 +170,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
168170
<input id={"submittingTime1" + this.idSuffix}
169171
className="sponsorTimeEdit sponsorTimeEditInput"
170172
type="text"
171-
style={{color: "inherit", backgroundColor: "inherit"}}
173+
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
172174
value={this.state.sponsorTimeEdits[1] ?? ""}
173175
onKeyDown={(e) => e.stopPropagation()}
174176
onKeyUp={(e) => e.stopPropagation()}
@@ -205,8 +207,6 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
205207
);
206208
}
207209

208-
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
209-
210210
return (
211211
<div id={"sponsorTimeEditContainer" + this.idSuffix} style={style}>
212212

0 commit comments

Comments
 (0)