diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-12-30 12:46:34 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-12-30 13:00:59 -0500 |
commit | 8e95ffecba99c991b2b076b5afe28d461a040683 (patch) | |
tree | 775a5f6bde0ca5b65ed671f1f469650b9cd3e815 /webapp/src/components.rs | |
parent | 71c95fcf1211cb32755f028c8322c9c07ddd6f89 (diff) |
Implement hand diagram component
For showing compactly on the result screen
Diffstat (limited to 'webapp/src/components.rs')
-rw-r--r-- | webapp/src/components.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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<protocol::card::Card>, + pub on_card_clicked: Callback<protocol::card::Card>, +} pub fn suit_css_class(suit: Suit) -> &'static str { match suit { |