Add option to Timeline component

This commit is contained in:
Korbs 2024-12-10 01:25:10 -05:00
parent 35d0699212
commit 545ee651af

View file

@ -1,12 +1,20 @@
--- ---
const { const {
Date, Date,
Time Time,
Upcoming
} = Astro.props } = Astro.props
if (Upcoming === true) {
var BorderColor = '#3a66b9'
} else {
var BorderColor = 'white'
}
--- ---
<div class="timeline"> <div style={"border-color: " + BorderColor} class="timeline">
<p class="timeline-date">{Date} - {Time}</p> <p style={"border-color: " + BorderColor} class="timeline-date">{Date} - {Time}</p>
<slot/> <slot/>
</div> </div>