fixed teachers only button for news

This commit is contained in:
strasmus1
2026-07-01 07:14:47 +00:00
parent 1a3c423140
commit 327765e6c1
2 changed files with 27 additions and 3 deletions
+2 -2
View File
@@ -167,13 +167,13 @@ export default function CreateNewsArticle() {
/>
{formErrors.content && <p className="error">{formErrors.content}</p>}
</Column>
<label>
<label className="teacher-only-toggle">
<input
type="checkbox"
checked={isTeacherOnly}
onChange={(e) => setIsTeacherOnly(e.target.checked)}
/>
Nur für Lehrer sichtbar
<span>Nur für Lehrer sichtbar</span>
</label>
<Row
justify={"space-between"}
+25 -1
View File
@@ -24,4 +24,28 @@
color: var(--fg3);
margin-top: 0.5rem;
width: 100%;
}
}
.teacher-only-toggle {
display: inline-flex;
align-items: center;
gap: var(--u-2xs);
padding: var(--u-xs) var(--u-sm);
border-radius: var(--radius-sm);
border: 1px solid var(--bg3);
background-color: var(--bg2);
cursor: pointer;
width: fit-content;
}
.teacher-only-toggle input {
margin: 0;
width: 1rem;
height: 1rem;
}
.teacher-only-toggle span {
display: inline-block;
font-size: 0.95rem;
color: var(--fg1);
}