frontPanel/src/ui_kit/QuestionsMiniButton.tsx

51 lines
1.2 KiB
TypeScript
Raw Normal View History

2023-09-15 12:37:12 +00:00
import { Button, Typography, useTheme } from "@mui/material";
import Answer from "../assets/icons/questionsPage/answer";
import React from "react";
import { ReactNode } from "react";
interface QuestionsMiniButtonProps {
2023-09-15 12:37:12 +00:00
icon: ReactNode;
text: string;
onClick: () => void;
2023-10-17 13:43:31 +00:00
dataCy?: string;
}
2023-10-17 13:43:31 +00:00
export default function QuestionsMiniButton({ icon, text, onClick, dataCy }: QuestionsMiniButtonProps) {
2023-09-15 12:37:12 +00:00
const theme = useTheme();
2023-09-15 12:37:12 +00:00
return (
<>
<Button
variant="outlined"
2023-10-17 13:43:31 +00:00
data-cy={dataCy}
2023-09-15 12:37:12 +00:00
sx={{
padding: "26px 15px 15px 15px",
display: "flex",
flexDirection: "column",
justifyContent: "space-between",
width: "174px",
height: "140px",
border: "1px solid #9A9AAF",
borderRadius: "8px",
background: "transparent"
2023-09-15 12:37:12 +00:00
}}
onClick={onClick}
>
{icon}
<Typography
sx={{
textAlign: "left",
width: "100%",
2023-09-15 12:37:12 +00:00
fontWeight: 400,
fontSize: "16px",
lineHeight: "18.4px",
color: theme.palette.grey2.main,
}}
>
{text}
</Typography>
</Button>
</>
);
}