Skip to content

Commit de97370

Browse files
committed
Fix type for button variant
1 parent 8d8a38f commit de97370

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/blueapi/BlueapiComponents.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,26 @@ import {
88
Tooltip,
99
} from "@mui/material";
1010

11+
type VariantChoice = "outlined" | "contained";
12+
1113
type PlanButtonProps = {
1214
btnLabel: string;
1315
planName: string;
1416
planParams?: object;
1517
title?: string;
1618
// btnColour?: string;
17-
// btnVariant?: string;
19+
btnVariant?: VariantChoice;
1820
};
1921

2022
export function RunPlanButton(props: PlanButtonProps) {
2123
const params = props.planParams ? props.planParams : {};
24+
const variant = props.btnVariant ? props.btnVariant : "outlined";
2225

2326
return (
2427
<div>
2528
<Tooltip title={props.title ? props.title : ""} placement="bottom">
2629
<Button
27-
variant="contained"
30+
variant={variant}
2831
color="custom"
2932
onClick={() =>
3033
submitAndRunPlanImmediately({

0 commit comments

Comments
 (0)