Chore: hoist example projects for discoverability (#2959)
* hoist example projects, remove oidc * move over example projects from the separate repo * Update ecommerce site to the latest version of dioxus * update wifi scanner to 0.5 * drop the chatbot example; might be restored in a separate PR --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
This commit is contained in:
1 parent
a9f87384f8
commit
983fcfc616
94 files changed
+2774
-7322
No files matched your search
@@ -0,0 +1,44 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use crate::api::Product;
|
||||
|
||||
#[component]
|
||||
pub(crate) fn product_item(product: Product) -> Element {
|
||||
let Product {
|
||||
id,
|
||||
title,
|
||||
price,
|
||||
category,
|
||||
image,
|
||||
rating,
|
||||
..
|
||||
} = product;
|
||||
|
||||
rsx! {
|
||||
section { class: "h-40 p-2 m-2 shadow-lg ring-1 rounded-lg flex flex-row place-items-center hover:ring-4 hover:shadow-2xl transition-all duration-200",
|
||||
img {
|
||||
class: "object-scale-down w-1/6 h-full",
|
||||
src: "{image}",
|
||||
}
|
||||
div { class: "pl-4 text-left text-ellipsis",
|
||||
a {
|
||||
href: "/details/{id}",
|
||||
class: "w-full text-center",
|
||||
"{title}"
|
||||
}
|
||||
p {
|
||||
class: "w-full",
|
||||
"{rating}"
|
||||
}
|
||||
p {
|
||||
class: "w-full",
|
||||
"{category}"
|
||||
}
|
||||
p {
|
||||
class: "w-1/4",
|
||||
"${price}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user