add side widget button text color param
This commit is contained in:
parent
756b93a8b2
commit
8c1b6d97ef
@ -15,11 +15,12 @@ interface Props {
|
|||||||
quizId: string;
|
quizId: string;
|
||||||
position: "left" | "right";
|
position: "left" | "right";
|
||||||
buttonBackgroundColor?: string;
|
buttonBackgroundColor?: string;
|
||||||
|
buttonTextColor?: string;
|
||||||
dimensions?: { width: string; height: string; };
|
dimensions?: { width: string; height: string; };
|
||||||
fullScreen?: boolean;
|
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<boolean>(false);
|
const [isQuizShown, setIsQuizShown] = useState<boolean>(false);
|
||||||
const isMobile = useMediaQuery("(max-width: 600px)");
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
||||||
const isQuizCompleted = useQuizCompletionStatus(quizId);
|
const isQuizCompleted = useQuizCompletionStatus(quizId);
|
||||||
@ -68,6 +69,7 @@ export default function QuizSideButton({ quizId, position, buttonBackgroundColor
|
|||||||
width: "600px",
|
width: "600px",
|
||||||
maxWidth: `calc(100% - ${PADDING * 2}px)`,
|
maxWidth: `calc(100% - ${PADDING * 2}px)`,
|
||||||
backgroundColor: buttonBackgroundColor,
|
backgroundColor: buttonBackgroundColor,
|
||||||
|
color: buttonTextColor,
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
},
|
},
|
||||||
position === "left" && {
|
position === "left" && {
|
||||||
|
Loading…
Reference in New Issue
Block a user