2023-05-21 16:45:12 +00:00
|
|
|
#![allow(non_snake_case)]
|
2023-05-22 15:26:08 +00:00
|
|
|
use yew::prelude::*;
|
2023-05-24 15:20:12 +00:00
|
|
|
|
|
|
|
use super::source_plate::SourcePlate;
|
2023-05-21 16:45:12 +00:00
|
|
|
use super::destination_plate::DestinationPlate;
|
|
|
|
|
2023-05-22 15:26:08 +00:00
|
|
|
#[derive(Properties, PartialEq)]
|
|
|
|
pub struct PlateContainerProps {
|
2023-05-24 15:42:54 +00:00
|
|
|
pub source_dims: Option<(u8,u8)>,
|
|
|
|
pub destination_dims: Option<(u8,u8)>,
|
2023-05-22 15:26:08 +00:00
|
|
|
}
|
2023-05-21 16:45:12 +00:00
|
|
|
|
2023-05-22 15:26:08 +00:00
|
|
|
#[function_component]
|
|
|
|
pub fn PlateContainer(props: &PlateContainerProps) -> Html {
|
|
|
|
html! {
|
|
|
|
<div class="plate_container">
|
2023-05-24 15:42:54 +00:00
|
|
|
if let Some((w,h)) = props.source_dims {
|
|
|
|
<SourcePlate width={w} height={h} />
|
|
|
|
} else {
|
|
|
|
<h2>{"No Source Plate Selected"}</h2>
|
|
|
|
}
|
|
|
|
if let Some((w,h)) = props.destination_dims {
|
|
|
|
<DestinationPlate width={w} height={h} />
|
|
|
|
} else {
|
|
|
|
<h2>{"No Destination Plate Selected"}</h2>
|
|
|
|
}
|
2023-05-22 15:26:08 +00:00
|
|
|
</div>
|
|
|
|
}
|
2023-05-21 16:45:12 +00:00
|
|
|
}
|