Skip to content

Commit 7781d66

Browse files
committed
fix: optimiser tooltip icon wrap
1 parent 758fe2e commit 7781d66

File tree

6 files changed

+22
-30
lines changed

6 files changed

+22
-30
lines changed

website/src/views/optimiser/OptimiserForm/OptimiserForm.scss

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,12 @@
2929
}
3030

3131
.optimiserDescription {
32-
display: flex;
33-
flex-direction: row;
32+
margin: 0;
3433
margin-bottom: 0.5rem;
35-
36-
h4 {
37-
margin: 0;
38-
font-size: medium;
39-
}
34+
font-size: medium;
4035

4136
@include media-breakpoint-down(xs) {
42-
h4 {
43-
font-size: small;
44-
}
37+
font-size: small;
4538
}
4639
}
4740

website/src/views/optimiser/OptimiserForm/OptimiserFormTooltip.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
.optimiserTooltipIcon {
44
composes: svg svg-small from global;
55
margin: auto;
6-
margin-left: 0.5rem;
6+
margin-left: 1ch;
77
color: #69707a;
88
cursor: pointer;
99

1010
@include media-breakpoint-down(xs) {
1111
width: 0.8rem;
12-
margin-top: -0.2rem;
1312
}
1413
}

website/src/views/optimiser/OptimiserForm/OptimiserFreeDaySelect.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ const OptimiserFreeDaySelect: React.FC<Props> = ({ hasSaturday, optimiserFormFie
2929

3030
return (
3131
<section className={styles.freeDaysSection}>
32-
<span className={styles.optimiserDescription}>
33-
<h4>Select days you would like to be free</h4>
32+
<h4 className={styles.optimiserDescription}>
33+
Select days you would like to be free
3434
<OptimiserFormTooltip content="Chosen days will have no physical classes" />
35-
</span>
35+
</h4>
3636

3737
<div className={styles.freeDaysButtons}>
3838
{days.map((day) => (

website/src/views/optimiser/OptimiserForm/OptimiserLessonOptionSelect.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ const OptimiserLessonOptionSelect: React.FC<Props> = ({ lessonOptions, optimiser
3232

3333
return (
3434
<section>
35-
<span className={styles.optimiserDescription}>
36-
<h4>Select lessons you plan to attend live (in person/online)</h4>
35+
<h4 className={styles.optimiserDescription}>
36+
Select lessons you plan to attend live (in person/online)
3737
<OptimiserFormTooltip content="Chosen lessons will only be allocated on your school days" />
38-
</span>
38+
</h4>
3939

4040
{isEmpty(lessonOptions) ? (
4141
<div className={styles.noLessonsWarning}>

website/src/views/optimiser/OptimiserForm/OptimiserMaxConsecutiveHoursSelect.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const OptimiserMaxConsecutiveHoursSelect: React.FC<Props> = ({ optimiserFormFiel
1515

1616
return (
1717
<div className={styles.maxConsecutiveHours}>
18-
<span className={styles.optimiserDescription}>
19-
<h4>Select maximum consecutive hours of live lessons</h4>
18+
<h4 className={styles.optimiserDescription}>
19+
Select maximum consecutive hours of live lessons
2020
<OptimiserFormTooltip content="Prioritises having less than this number of consecutive hours of live lessons" />
21-
</span>
21+
</h4>
2222

2323
<select
2424
value={maxConsecutiveHours}

website/src/views/optimiser/OptimiserForm/OptimiserTimeRangeSelect.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ const OptimiserLessonTimeRangeSelect: React.FC<LessonTimeRangeSelectProps> = ({
6464
return (
6565
<section className={styles.timeControls}>
6666
<div className={styles.timeColumn}>
67-
<span className={styles.optimiserDescription}>
68-
<h4>Earliest start time</h4>
67+
<h4 className={styles.optimiserDescription}>
68+
Earliest start time
6969
<OptimiserFormTooltip content="There will be no physical class before this time" />
70-
</span>
70+
</h4>
7171

7272
<OptimiserTimeRangeSelect
7373
currentValue={lessonTimeRange.earliest}
@@ -77,10 +77,10 @@ const OptimiserLessonTimeRangeSelect: React.FC<LessonTimeRangeSelectProps> = ({
7777
</div>
7878

7979
<div className={styles.timeColumn}>
80-
<span className={styles.optimiserDescription}>
81-
<h4>Latest end time</h4>
80+
<h4 className={styles.optimiserDescription}>
81+
Latest end time
8282
<OptimiserFormTooltip content="There will be no physical class after this time" />
83-
</span>
83+
</h4>
8484

8585
<OptimiserTimeRangeSelect
8686
currentValue={lessonTimeRange.latest}
@@ -126,10 +126,10 @@ const OptimiserLunchTimeRangeSelect: React.FC<LunchTimeRangeSelectProps> = ({
126126
return (
127127
<section className={styles.timeControls}>
128128
<div className={styles.timeColumn}>
129-
<span className={styles.optimiserDescription}>
130-
<h4>Select range for preferred lunch break timings</h4>
129+
<h4 className={styles.optimiserDescription}>
130+
Select range for preferred lunch break timings
131131
<OptimiserFormTooltip content="Prioritises 1-hour lunch breaks in this range" />
132-
</span>
132+
</h4>
133133

134134
<div className={styles.timeRow}>
135135
<OptimiserTimeRangeSelect

0 commit comments

Comments
 (0)