@@ -21,6 +21,7 @@ import {
2121 ArrowUpwardRounded ,
2222 Close ,
2323 Help ,
24+ Padding ,
2425} from "@mui/icons-material" ;
2526import { useState } from "react" ;
2627
@@ -31,6 +32,7 @@ import { PvDescription } from "../pv/types";
3132import { SelectionWithPlanRunner } from "../components/SelectionControl" ;
3233import { BacklightPositions , ZoomLevels } from "../pv/enumPvValues" ;
3334import oxfordChipDiagram from "../assets/Oxford Chip Diagram.excalidraw.svg" ;
35+ import { RunPlanButton } from "../blueapi/BlueapiComponents" ;
3436
3537const buttonStyle = {
3638 color : "white" ,
@@ -205,59 +207,34 @@ export function PresetMovements() {
205207 < p >
206208 < b > Preset Positions</ b >
207209 </ p >
208- < Grid2 >
209- < Tooltip title = { "Move into position for collection" } >
210- < Button
211- style = { buttonStyle }
212- onClick = { ( ) =>
213- submitAndRunPlanImmediately ( {
214- planName : "moveto_preset" ,
215- planParams : {
216- place : "collect_position" ,
217- } ,
218- } )
219- }
220- >
221- Collect Position
222- </ Button >
223- </ Tooltip >
224-
225- < Tooltip title = { "Move hardware for sample loading" } >
226- < Button
227- style = { buttonStyle }
228- onClick = { ( ) =>
229- submitAndRunPlanImmediately ( {
230- planName : "moveto_preset" ,
231- planParams : {
232- place : "load_position" ,
233- } ,
234- } )
235- }
236- >
237- Load Position
238- </ Button >
239- </ Tooltip >
240- < Tooltip title = { "Align microdrop" } >
241- < Button
242- style = { buttonStyle }
243- onClick = { ( ) =>
244- submitAndRunPlanImmediately ( {
245- planName : "moveto_preset" ,
246- planParams : {
247- place : "microdrop_position" ,
248- } ,
249- } )
250- }
251- >
252- Microdrop Align
253- </ Button >
254- </ Tooltip >
255- </ Grid2 >
210+ < Stack padding = { "20px" } margin = { "10px" } spacing = { 1 } >
211+ < RunPlanButton
212+ btnLabel = "Collect Position"
213+ planName = "moveto_preset"
214+ planParams = { { place : "collect_position" } }
215+ title = "Move into position for collection"
216+ btnSize = "small"
217+ />
218+ < RunPlanButton
219+ btnLabel = "Load Position"
220+ planName = "moveto_preset"
221+ planParams = { { place : "load_position" } }
222+ title = "Move hardware for sample loading"
223+ btnSize = "small"
224+ />
225+ < RunPlanButton
226+ btnLabel = "Microdrop align"
227+ planName = "moveto_preset"
228+ planParams = { { place : "microdrop_position" } }
229+ title = "Align microdrop"
230+ btnSize = "small"
231+ />
232+ </ Stack >
256233 </ Box >
257234 ) ;
258235}
259236
260- export function SideDrawer ( ) {
237+ export function PresetPositionsSideDrawer ( ) {
261238 const [ open , setOpen ] = useState ( false ) ;
262239 const toggleDrawer = ( newOpen : boolean ) => ( ) => {
263240 setOpen ( newOpen ) ;
@@ -507,7 +484,7 @@ export function OavMover() {
507484 < hr />
508485 < CoordinateSystem />
509486 < hr />
510- < SideDrawer />
487+ < PresetPositionsSideDrawer />
511488 </ Grid2 >
512489 </ Grid2 >
513490 </ div >
0 commit comments