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
sx={{
width: isMobile ? "auto" : "100%",
maxWidth: "310px",
width: isMobile
? "auto"
: `${listQuestions[quizId][totalIndex].content.steps * 44}px`,
minWidth: "200px",
maxWidth: "440px",
display: "flex",
padding: "20px",
flexDirection: "column",
@ -96,32 +99,34 @@ export default function RatingOptions({ totalIndex }: Props) {
</Box>
))}
</Box>
<Box
sx={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
}}
>
<Typography
{!listQuestions[quizId][totalIndex].content.ratingDescription && (
<Box
sx={{
color: theme.palette.grey2.main,
fontSize: "16px",
fontWeight: 400,
display: "flex",
alignItems: "center",
justifyContent: "space-between",
}}
>
Негативно
</Typography>
<Typography
sx={{
color: theme.palette.grey2.main,
fontSize: "16px",
fontWeight: 400,
}}
>
Позитивно
</Typography>
</Box>
<Typography
sx={{
color: theme.palette.grey2.main,
fontSize: "16px",
fontWeight: 400,
}}
>
Негативно
</Typography>
<Typography
sx={{
color: theme.palette.grey2.main,
fontSize: "16px",
fontWeight: 400,
}}
>
Позитивно
</Typography>
</Box>
)}
{listQuestions[quizId][totalIndex].content.ratingExpanded &&
(listQuestions[quizId][totalIndex].content.ratingDescription ? (
<Typography>

@ -115,7 +115,7 @@ export default function SettingSlider({ totalIndex }: SettingSliderProps) {
</Typography>
<Slider
value={listQuestions[quizId][totalIndex].content.steps}
min={1}
min={2}
max={10}
aria-label="Default"
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
sx={{ mr: isMobile ? "0px" : "16px" }}
label={"Внутреннее название вопроса"}