2023-09-15 12:37:12 +00:00
|
|
|
import { Button, Typography, useTheme } from "@mui/material";
|
2023-05-03 19:21:00 +00:00
|
|
|
import Answer from "../assets/icons/questionsPage/answer";
|
2023-03-10 01:38:31 +00:00
|
|
|
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-03-10 01:38:31 +00:00
|
|
|
}
|
|
|
|
|
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-03-10 01:38:31 +00:00
|
|
|
|
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",
|
2023-12-01 20:45:35 +00:00
|
|
|
background: "transparent"
|
2023-09-15 12:37:12 +00:00
|
|
|
}}
|
|
|
|
onClick={onClick}
|
|
|
|
>
|
|
|
|
{icon}
|
|
|
|
<Typography
|
|
|
|
sx={{
|
|
|
|
textAlign: "left",
|
2023-12-01 20:45:35 +00:00
|
|
|
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>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|