Skip to content

Commit

Permalink
Make DOJO solve exercises button 100% on small width
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjenningz committed Sep 24, 2022
1 parent caa7909 commit 12945fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pages/exercises/[lessonSlug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,18 @@ const ExerciseList = ({
tabs={tabs}
/>
</div>
<div className="d-flex justify-content-between align-items-center">
<h1 className="my-5 fs-2">{lessonTitle}</h1>
<NewButton onClick={() => setExerciseIndex(0)}>
SOLVE EXERCISES
</NewButton>
<div className="d-flex flex-column flex-md-row justify-content-between align-items-center">
<h1 className="my-2 my-md-5 fs-2">{lessonTitle}</h1>
<div
className={`mb-3 mb-md-0 d-flex d-md-block ${styles.exerciseList__solveExercisesButtonContainer}`}
>
<NewButton
className="flex-grow-1"
onClick={() => setExerciseIndex(0)}
>
SOLVE EXERCISES
</NewButton>
</div>
</div>
<div className={styles.exerciseList__container}>
{mockExercisePreviews.map((exercisePreview, i) => (
Expand Down
6 changes: 6 additions & 0 deletions scss/exercises.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 2em;
}

.exerciseList__solveExercisesButtonContainer {
@media (max-width: 767px) {
width: 100%;
}
}

0 comments on commit 12945fb

Please sign in to comment.