Skip to content

Commit

Permalink
Styling for cohort form
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebrownlee committed Jan 10, 2024
1 parent 489b382 commit 0f75fc9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/cohorts/CohortDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const CohortDetails = () => {
/>
</div>

<button onClick={saveURLs}>Save URLs</button>
<button className="isometric-button blue" onClick={saveURLs}>Save URLs</button>
</div>

<div className="cohort__detail cohort__detail--medium">
Expand Down
8 changes: 5 additions & 3 deletions src/components/cohorts/CohortForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export const CohortForm = () => {
{
courses.map(course => {
return <button key={`course--${course.id}`}
className={`${clientSideCourse === course.id ? "button-28--achieved" : "button-28"}`}
style={{ margin: "0 0.15rem" }}
className={`isometric-button ${clientSideCourse === course.id ? "red" : "gray"}`}
onClick={e => {
e.preventDefault()
setClient(course.id)
Expand All @@ -112,7 +113,8 @@ export const CohortForm = () => {
{
courses.map(course => {
return <button key={`course--${course.id}`}
className={`${serverSideCourse === course.id ? "button-28--achieved" : "button-28"}`}
style={{ margin: "0 0.15rem" }}
className={`isometric-button ${serverSideCourse === course.id ? "red" : "gray"}`}
onClick={e => {
e.preventDefault()
setServer(course.id)
Expand All @@ -131,7 +133,7 @@ export const CohortForm = () => {
constructNewCohort()
}
}
className="btn btn-primary"> Create </button>
className="isometric-button blue"> Create </button>
</form>
</>
)
Expand Down
18 changes: 11 additions & 7 deletions src/components/people/StudentNotePopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export const StudentNotePopup = ({ student }) => {
})
}

const completeNoteCreation = () => {
createStudentNote()
.then(() => getStudentNotes(student.id))
.then(() => setNote(""))
.then(() => setOpen(false))
}

return (
<Popover.Root open={open} onOpenChange={isOpen => {
setOpen(isOpen)
Expand All @@ -54,10 +61,7 @@ export const StudentNotePopup = ({ student }) => {
onKeyDown={
e => {
if (e.key === "Enter") {
createStudentNote()
.then(() => getStudentNotes(student.id))
.then(() => setNote(""))
.then(() => setOpen(false))
completeNoteCreation()
}
}
} />
Expand All @@ -66,9 +70,9 @@ export const StudentNotePopup = ({ student }) => {
<Popover.Arrow className="PopoverArrow" />

<div style={{ display: 'flex', flexDirection: 'row', gap: 10 }}>
<button style={{
marginLeft: "auto"
}} className="isometric-button blue small">Save</button>
<button
onClick={completeNoteCreation}
style={{ marginLeft: "auto" }} className="isometric-button blue small">Save</button>
</div>
</Popover.Content>
</Popover.Portal>
Expand Down

0 comments on commit 0f75fc9

Please sign in to comment.