mirror of
https://github.com/bendtherules/is-nifty-open.git
synced 2026-08-18 13:52:20 +00:00
Colorize next open closing text
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
height: 100%;
|
||||
font-size: 1em;
|
||||
background-color: rgba(0, 0, 0, 0.75);
|
||||
|
||||
color: rgba(255, 255, 255, 0.60);
|
||||
font-size: 2em;
|
||||
position: relative;
|
||||
@@ -24,3 +23,11 @@
|
||||
width: 80%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.NextOpenCloseMini .green-text {
|
||||
color: rgba(46, 204, 64, 0.75);
|
||||
}
|
||||
|
||||
.NextOpenCloseMini .red-text {
|
||||
color: rgba(255, 64, 54, 0.75);
|
||||
}
|
||||
@@ -31,13 +31,17 @@ export class NextOpenCloseMini extends React.Component<NextOpenCloseMiniProps, {
|
||||
return this.openOrClose === OpenOrClose.Open ? "opening" : "closing";
|
||||
}
|
||||
|
||||
getOpeningClosingClassName() {
|
||||
return this.openOrClose === OpenOrClose.Open ? "green-text" : "red-text";
|
||||
}
|
||||
|
||||
renderDate(): JSX.Element[] {
|
||||
const tmpNextDate = this.nextOpenOrCloseDate as moment.Moment;
|
||||
var nextDateString = tmpNextDate.from(this.xDay);
|
||||
return [
|
||||
(
|
||||
<div className="openCloseDecription" key="title">
|
||||
Next {this.getOpeningClosingString()}
|
||||
Next <span className={this.getOpeningClosingClassName()}>{this.getOpeningClosingString()}</span>
|
||||
</div>
|
||||
),
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user