Skip to content

Commit a19e92d

Browse files
author
Tamoor Shahid
committed
Styled buttons and added plans onClick
1 parent 3d71c69 commit a19e92d

File tree

1 file changed

+74
-9
lines changed

1 file changed

+74
-9
lines changed

src/screens/OavMover.tsx

Lines changed: 74 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,36 +200,101 @@ export function CoordinateSystem() {
200200
setOpen(false);
201201
};
202202

203+
const buttonStyle = {
204+
color: "white",
205+
margin: "5px",
206+
padding: "15px",
207+
backgroundColor: "#1c2025",
208+
};
209+
203210
return (
204211
<>
205212
<Box>
206-
<Grid2 container spacing={2}>
213+
<Grid2 container spacing={1}>
207214
<Grid2 size={10}>
208215
<b>Co-ordinate System Setup</b>
209216
</Grid2>
210217
<Grid2>
211218
<Help onClick={handleClickOpen} />
212219
</Grid2>
213220
<Grid2 size={4}>
214-
<Button>Move chip to origin</Button>
221+
<Button
222+
style={buttonStyle}
223+
onClick={() =>
224+
submitAndRunPlanImmediately("moveto", {
225+
place: "zero",
226+
})
227+
}
228+
>
229+
Move chip to origin
230+
</Button>
215231
</Grid2>
216232
<Grid2 size={4}>
217-
<Button>Go to Fiducial 1</Button>
233+
<Button
234+
style={buttonStyle}
235+
onClick={() =>
236+
submitAndRunPlanImmediately("moveto", {
237+
place: "f1",
238+
})
239+
}
240+
>
241+
Go to Fiducial 1
242+
</Button>
218243
</Grid2>
219244
<Grid2 size={4}>
220-
<Button>Go to Fiducial 2</Button>
245+
<Button
246+
style={buttonStyle}
247+
onClick={() =>
248+
submitAndRunPlanImmediately("moveto", {
249+
place: "f2",
250+
})
251+
}
252+
>
253+
Go to Fiducial 2
254+
</Button>
221255
</Grid2>
222256
<Grid2 size={4}>
223-
<Button>Set Fiducial 0</Button>
257+
<Button style={buttonStyle}>Set Fiducial 0</Button>
224258
</Grid2>
225259
<Grid2 size={4}>
226-
<Button>Set Fiducial 1</Button>
260+
<Button
261+
style={buttonStyle}
262+
onClick={() =>
263+
submitAndRunPlanImmediately("fiducial", {
264+
point: "1",
265+
})
266+
}
267+
>
268+
Set Fiducial 1
269+
</Button>
227270
</Grid2>
228271
<Grid2 size={4}>
229-
<Button>Set Fiducial 2</Button>
272+
<Button
273+
style={buttonStyle}
274+
onClick={() =>
275+
submitAndRunPlanImmediately("fiducial", {
276+
point: "2",
277+
})
278+
}
279+
>
280+
Set Fiducial 2
281+
</Button>
282+
</Grid2>
283+
<Grid2 size={6}>
284+
<Button
285+
style={buttonStyle}
286+
onClick={() => submitAndRunPlanImmediately("cs_maker", {})}
287+
>
288+
Make Coordinate System
289+
</Button>
230290
</Grid2>
231-
<Grid2 size={8} offset={2}>
232-
<Button>Make Coordinate System</Button>
291+
<Grid2 size={6}>
292+
<Button
293+
style={buttonStyle}
294+
onClick={() => submitAndRunPlanImmediately("block_check", {})}
295+
>
296+
Block Check
297+
</Button>
233298
</Grid2>
234299
</Grid2>
235300
</Box>

0 commit comments

Comments
 (0)