fix: rating stars

This commit is contained in:
IlyaDoronin 2023-09-21 15:15:49 +03:00
parent cf6109eb4e
commit d855833c96
2 changed files with 38 additions and 27 deletions

@ -51,8 +51,11 @@ export default function RatingOptions({ totalIndex }: Props) {
<> <>
<Box <Box
sx={{ sx={{
width: isMobile ? "auto" : "100%", width: isMobile
maxWidth: "310px", ? "auto"
: `${listQuestions[quizId][totalIndex].content.steps * 44}px`,
minWidth: "200px",
maxWidth: "440px",
display: "flex", display: "flex",
padding: "20px", padding: "20px",
flexDirection: "column", flexDirection: "column",
@ -96,6 +99,7 @@ export default function RatingOptions({ totalIndex }: Props) {
</Box> </Box>
))} ))}
</Box> </Box>
{!listQuestions[quizId][totalIndex].content.ratingDescription && (
<Box <Box
sx={{ sx={{
display: "flex", display: "flex",
@ -122,6 +126,7 @@ export default function RatingOptions({ totalIndex }: Props) {
Позитивно Позитивно
</Typography> </Typography>
</Box> </Box>
)}
{listQuestions[quizId][totalIndex].content.ratingExpanded && {listQuestions[quizId][totalIndex].content.ratingExpanded &&
(listQuestions[quizId][totalIndex].content.ratingDescription ? ( (listQuestions[quizId][totalIndex].content.ratingDescription ? (
<Typography> <Typography>

@ -115,7 +115,7 @@ export default function SettingSlider({ totalIndex }: SettingSliderProps) {
</Typography> </Typography>
<Slider <Slider
value={listQuestions[quizId][totalIndex].content.steps} value={listQuestions[quizId][totalIndex].content.steps}
min={1} min={2}
max={10} max={10}
aria-label="Default" aria-label="Default"
valueLabelDisplay="auto" valueLabelDisplay="auto"
@ -139,7 +139,13 @@ export default function SettingSlider({ totalIndex }: SettingSliderProps) {
}); });
}} }}
/> />
<Box sx={{ width: isMobile ? "90%" : "auto", display: "flex", alignItems: "center" }}> <Box
sx={{
width: isMobile ? "90%" : "auto",
display: "flex",
alignItems: "center",
}}
>
<CustomCheckbox <CustomCheckbox
sx={{ mr: isMobile ? "0px" : "16px" }} sx={{ mr: isMobile ? "0px" : "16px" }}
label={"Внутреннее название вопроса"} label={"Внутреннее название вопроса"}