Added status to date

This commit is contained in:
meraghon committed 2025-12-05 12:39:41 -05:00
1 parent 3b1bf88567
commit 4115d24bd8
1 file changed
+24 -12
+24 -12
View File
@@ -21,8 +21,9 @@ pub fn Date(
/// The file path or URL of the icon displayed at the top of the button. /// The file path or URL of the icon displayed at the top of the button.
#[prop(into)] #[prop(into)]
icon: String, icon: String,
// The status of the event (open, upcoming, deadline...) /// The status of the event (open, upcoming, deadline...)
//#[prop(into)] status: String, #[prop(into)]
status: String,
) -> impl IntoView { ) -> impl IntoView {
view! { view! {
<div class="dashboard-button flex items-start gap-3 rounded-lg border-grey-300 p-3 <div class="dashboard-button flex items-start gap-3 rounded-lg border-grey-300 p-3
@@ -31,16 +32,27 @@ pub fn Date(
<div class="flex-shrink-0 mt-0.5"> <div class="flex-shrink-0 mt-0.5">
<img src={icon.clone()} class="h-4 w-4" alt="icon"/> <img src={icon.clone()} class="h-4 w-4" alt="icon"/>
</div> </div>
<div class="flex flex-col"> <div class="flex-1 min-w-0">
<h3 class="font-semibold text-md text-base"> <div class="flex items-start justify-between">
{title.clone()} <div class="flex-1">
</h3> <h3 class="font-semibold text-md text-base">
<h3 class="font-bold text-md text-base mt-1"> {title.clone()}
{date.clone()} </h3>
</h3> <h3 class="font-bold text-md text-base mt-1">
<p class="text-sm text-gray-600 mt-1"> {date.clone()}
{description.clone()} </h3>
</p> <p class="text-sm text-gray-600">
{description.clone()}
</p>
</div>
<div class="flex-shrink-0 ml-2">
<span
{/* Temporary status color & design*/}
class="inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0">
{status.clone()}
</span>
</div>
</div>
</div> </div>
</div> </div>
} }