From 8e95ffecba99c991b2b076b5afe28d461a040683 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Fri, 30 Dec 2022 12:46:34 -0500 Subject: Implement hand diagram component For showing compactly on the result screen --- webapp/src/components.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'webapp/src/components.rs') diff --git a/webapp/src/components.rs b/webapp/src/components.rs index d4b03ee..833ecdc 100644 --- a/webapp/src/components.rs +++ b/webapp/src/components.rs @@ -1,5 +1,7 @@ +use yew::prelude::*; use protocol::card::Suit; +mod hand_diagram; mod app_context_provider; mod bidding; mod bidding_box; @@ -23,6 +25,14 @@ pub use self::show_bid::*; pub use self::table::*; pub use self::trick_in_play::*; pub use self::tricks_played::*; +pub use self::hand_diagram::*; + +#[derive(Clone, Default, PartialEq, Properties)] +pub struct HandProps { + #[prop_or_default] + pub cards: Vec, + pub on_card_clicked: Callback, +} pub fn suit_css_class(suit: Suit) -> &'static str { match suit { -- cgit v1.2.3