Remove dummy components

This commit is contained in:
Emilia Allison 2023-05-21 12:48:42 -04:00
parent 98038944f2
commit 303831bda3
Signed by: emilia
GPG Key ID: 7A3F8997BFE894E0
2 changed files with 1 additions and 29 deletions

View File

@ -1,6 +1,7 @@
div.plate_container {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: flex-end;
}

View File

@ -25,8 +25,6 @@ pub fn SourcePlate(cx: Scope<SourcePlateProps>) -> Element {
div{
class: "source_plate",
style { STYLE }
SourcePlateSelectionIndicator {}
SourcePlateSelectionController {}
table {
draggable: "false",
for i in 1..=cx.props.height {
@ -98,33 +96,6 @@ fn in_rect(corner1: Option<(u8, u8)>, corner2: Option<(u8, u8)>, pt: (u8, u8)) -
}
}
// This is a dummy component for design purposes only
fn SourcePlateSelectionIndicator(cx: Scope) -> Element {
let selection_state = use_shared_state::<SelectionState>(cx).unwrap();
let start_str = match selection_state.read().m_start {
Some(start) => format!("{},{}", start.0, start.1),
None => "None".to_string(),
};
let end_str = match selection_state.read().m_end {
Some(end) => format!("{},{}", end.0, end.1),
None => "None".to_string(),
};
cx.render(rsx! {
p { start_str ", and " end_str }
})
}
fn SourcePlateSelectionController(cx: Scope) -> Element {
cx.render(rsx! {
div {
button {
"Select"
}
}
})
}
#[cfg(test)]
mod tests {
use super::in_rect;