Skip to content

Commit f5c84c7

Browse files
author
Tamoor Shahid
committed
Progress
1 parent d183335 commit f5c84c7

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

src/blueapi/BlueapiComponents.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ type RunPlanButtonProps = {
2121
title?: string;
2222
btnVariant?: VariantChoice;
2323
btnSize?: ButtonSize;
24+
sx?: object;
25+
tooltipSx?: object;
26+
typographySx?: object;
2427
};
2528

2629
// @{todo} Ideally we should be able to set up the stylings for
@@ -47,6 +50,8 @@ export function RunPlanButton(props: RunPlanButtonProps) {
4750
const params = props.planParams ? props.planParams : {};
4851
const variant = props.btnVariant ? props.btnVariant : "outlined";
4952
const size = props.btnSize ? props.btnSize : "medium";
53+
const sx = props.sx ? props.sx : {};
54+
const tooltipSx = props.tooltipSx ? props.tooltipSx : {};
5055

5156
const handleClick = () => {
5257
setOpenSnackbar(true);
@@ -85,12 +90,18 @@ export function RunPlanButton(props: RunPlanButtonProps) {
8590

8691
return (
8792
<div>
88-
<Tooltip title={props.title ? props.title : ""} placement="bottom">
93+
<Tooltip
94+
title={props.title ? props.title : ""}
95+
placement="bottom"
96+
sx={tooltipSx}
97+
arrow
98+
>
8999
<Button
90100
variant={variant}
91101
color="custom"
92102
size={size}
93103
onClick={handleClick}
104+
sx={sx}
94105
>
95106
<Typography
96107
variant="button"

src/screens/OavMover.tsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,13 @@ export function CoordinateSystem() {
261261
setOpen(false);
262262
};
263263

264-
// const buttonStyle = {
265-
// color: "white",
266-
// padding: "12px",
267-
// backgroundColor: "#1c2025",
268-
// width: "100%",
269-
// height: "85%",
270-
// };
264+
const buttonStyle = {
265+
color: "white",
266+
padding: "12px",
267+
backgroundColor: "#1c2025",
268+
width: "90%",
269+
height: "85%",
270+
};
271271

272272
return (
273273
<>
@@ -287,6 +287,8 @@ export function CoordinateSystem() {
287287
title="Go to Fiducial 0"
288288
btnVariant="contained"
289289
btnSize="large"
290+
sx={buttonStyle}
291+
tooltipSx={{ color: "green" }}
290292
/>
291293
</Grid2>
292294
<Grid2 size={4}>
@@ -297,6 +299,7 @@ export function CoordinateSystem() {
297299
title="Go to Fiducial 1"
298300
btnVariant="contained"
299301
btnSize="large"
302+
sx={buttonStyle}
300303
/>
301304
</Grid2>
302305
<Grid2 size={4}>
@@ -307,6 +310,7 @@ export function CoordinateSystem() {
307310
title="Go to Fiducial 2"
308311
btnVariant="contained"
309312
btnSize="large"
313+
sx={buttonStyle}
310314
/>
311315
</Grid2>
312316
<Grid2 size={4}>
@@ -315,6 +319,7 @@ export function CoordinateSystem() {
315319
planName="gui_set_fiducial_0"
316320
title="Set Fiducial 0"
317321
btnVariant="contained"
322+
sx={buttonStyle}
318323
/>
319324
</Grid2>
320325
<Grid2 size={4}>
@@ -324,6 +329,7 @@ export function CoordinateSystem() {
324329
planParams={{ point: "1" }}
325330
title="Set Fiducial 1"
326331
btnVariant="contained"
332+
sx={buttonStyle}
327333
/>
328334
</Grid2>
329335
<Grid2 size={4}>
@@ -333,6 +339,7 @@ export function CoordinateSystem() {
333339
planParams={{ point: "2" }}
334340
title="Set Fiducial 2"
335341
btnVariant="contained"
342+
sx={buttonStyle}
336343
/>
337344
</Grid2>
338345
<Grid2 size={6}>
@@ -341,6 +348,7 @@ export function CoordinateSystem() {
341348
planName="cs_maker"
342349
title="Create the coordinate system on the pmac."
343350
btnVariant="contained"
351+
sx={buttonStyle}
344352
/>
345353
</Grid2>
346354
<Grid2 size={6}>
@@ -349,6 +357,7 @@ export function CoordinateSystem() {
349357
planName="block_check"
350358
title="Check the coordinate system was set up correctly."
351359
btnVariant="contained"
360+
sx={buttonStyle}
352361
/>
353362
</Grid2>
354363
</Grid2>

0 commit comments

Comments
 (0)