From 8c1b6d97efe02bd0d2b90c96fdbdb02561d46159 Mon Sep 17 00:00:00 2001 From: nflnkr Date: Sat, 4 May 2024 19:58:01 +0300 Subject: [PATCH] add side widget button text color param --- src/widgets/side/QuizSideButton.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/side/QuizSideButton.tsx b/src/widgets/side/QuizSideButton.tsx index 7f563ec..e911c20 100644 --- a/src/widgets/side/QuizSideButton.tsx +++ b/src/widgets/side/QuizSideButton.tsx @@ -15,11 +15,12 @@ interface Props { quizId: string; position: "left" | "right"; buttonBackgroundColor?: string; + buttonTextColor?: string; dimensions?: { width: string; height: string; }; fullScreen?: boolean; } -export default function QuizSideButton({ quizId, position, buttonBackgroundColor, dimensions, fullScreen = false }: Props) { +export default function QuizSideButton({ quizId, position, buttonBackgroundColor, buttonTextColor, dimensions, fullScreen = false }: Props) { const [isQuizShown, setIsQuizShown] = useState(false); const isMobile = useMediaQuery("(max-width: 600px)"); const isQuizCompleted = useQuizCompletionStatus(quizId); @@ -68,6 +69,7 @@ export default function QuizSideButton({ quizId, position, buttonBackgroundColor width: "600px", maxWidth: `calc(100% - ${PADDING * 2}px)`, backgroundColor: buttonBackgroundColor, + color: buttonTextColor, overflow: "hidden", }, position === "left" && {