use yew::prelude::*; use crate::card::{self, Suit, Rank}; use crate::components::suit_css_class; #[function_component(Card)] pub fn ccard(props: &CardProps) -> Html { html! {
{ props.rank }
} } #[derive(PartialEq, Properties, Clone)] pub struct CardProps { pub suit: Suit, pub rank: Rank, } impl From for CardProps { fn from(card::Card(suit, rank): card::Card) -> Self { CardProps { suit, rank } } }