Skip to content

Commit

Permalink
Fix: Added hover effect on cancel animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Snehagupta1907 committed Mar 1, 2025
1 parent 72bef6e commit e0027d1
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 97 deletions.
8 changes: 3 additions & 5 deletions components/UI/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type ButtonProps = {
disabled?: boolean;
color?: string;
loading?: boolean;
className?: string;
};

const Button: FunctionComponent<ButtonProps> = ({
Expand All @@ -16,17 +17,14 @@ const Button: FunctionComponent<ButtonProps> = ({
disabled = false,
color = "primary",
loading = false,
className = "",
}) => {
return (
<button
disabled={disabled}
onClick={onClick}
className={
styles["nq-button"] +
" " +
(color === "primary" ? "" : styles["nq-button-secondary"]) +
" " +
(disabled ? styles.disabled_button : "")
`${styles["nq-button"]} ${color === "primary" ? "" : styles["nq-button-secondary"]} ${disabled ? styles.disabled_button : ""} ${className}`.trim()
}
>
{loading ? (
Expand Down
2 changes: 1 addition & 1 deletion components/quiz/quizControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const QuizControls: FunctionComponent<QuizControlsProps> = ({
return (
<div className={styles.controls}>
<BackButton onClick={() => setStep(step - 1)} />
<button onClick={() => (onCancel ? onCancel() : setStep(-2))}>
<button className={styles.closeButton} onClick={() => (onCancel ? onCancel() : setStep(-2))}>
Cancel
</button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion components/quiz/startScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const StartScreen: FunctionComponent<StartScreenProps> = ({
actionBar={
<Button onClick={() => setStep(step + 1)}>Start Quiz</Button>
}
highlightTitle={false}
>
<Typography type={TEXT_TYPE.BODY_DEFAULT}>{description}</Typography>
<Typography type={TEXT_TYPE.BODY_DEFAULT} className="mt-4 text-white/50 text-sm">{description}</Typography>
</ScreenLayout>
</div>
<QuizControls step={step} setStep={setStep} />
Expand Down
Loading

0 comments on commit e0027d1

Please sign in to comment.