fix checkbox css

This commit is contained in:
2026-04-02 00:22:04 +02:00
parent c210aec76f
commit 76f7ed4f8d
2 changed files with 66 additions and 13 deletions
@@ -5,6 +5,51 @@
gap: 20px;
}
.divNotif {
display: flex;
align-items: center;
justify-content: space-between;
}
.checkboxLabel {
display: flex;
align-items: center;
cursor: pointer;
}
.checkboxLabel input {
display: none;
}
.checkmark {
width: 30px;
height: 30px;
border-radius: 6px;
border: 2px solid #019AFF;
background-color: transparent;
transition: all 0.2s ease;
position: relative;
}
.checkboxLabel input:checked + .checkmark {
background-color: #019AFF;
}
.checkmark::after {
content: "";
position: absolute;
display: none;
}
.checkboxLabel input:checked + .checkmark::after {
display: block;
left: 8px;
top: 4px;
width: 6px;
height: 12px;
border: solid white;
border-width: 0 3px 3px 0;
transform: rotate(45deg);
}
.modifyIcon {
height: 26px;
width: 26px;
@@ -225,22 +225,30 @@ export default function SettingsModal() {
<div className={`glassBorder ${styles.section}`}>
<h3>Notifications</h3>
<div>
<h4>Notifications par email</h4>
<div className={styles.divNotif}>
<h4>Notifications sur le site</h4>
<label className={styles.checkboxLabel}>
<input
type="checkbox"
checked={emailNotifications === 1}
onChange={handleEmailToggle}
/>
<span className={styles.checkmark}></span>
</label>
</div>
<div>
<div className={styles.divNotif}>
<h4>Notifications sur le site</h4>
<label className={styles.checkboxLabel}>
<input
type="checkbox"
checked={webNotifications === 1}
onChange={handleWebToggle}
/>
<span className={styles.checkmark}></span>
</label>
</div>
</div>