Skip to content

Commit 40b1fa7

Browse files
committed
fix: make responsive forms of activities section #537
1 parent ba5842c commit 40b1fa7

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@import '../../../../../styles/colors.scss';
22

33
.activity-list {
4-
overflow: auto; display:inline-block; width: 60%;
4+
overflow: auto;
55
}

src/app/modules/activities-management/components/create-activity/create-activity.component.html

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<h4>Activities</h4>
22
<hr/>
3-
<div style="width: 60%;">
3+
<div>
44

55
<form [formGroup]="activityForm" (ngSubmit)="onSubmit(activityForm.value)">
6-
<div class="input-group input-group-sm mb-3">
7-
<div class="input-group-prepend">
8-
<span class="input-group-text span-width">Name</span>
9-
</div>
10-
<input class="form-control" id="name" type="text" formControlName="name"
6+
<div class="form-group">
7+
<label>Name:</label>
8+
<div>
9+
<input class="form-control" id="name" type="text" formControlName="name"
1110
[class.is-invalid]="name.invalid && name.touched" required />
12-
<div class="text-danger" *ngIf="(name.dirty || name.touched) && name.invalid && name.errors.required">
13-
Activity name is required.
11+
<div class="text-danger" *ngIf="(name.dirty || name.touched) && name.invalid && name.errors.required">
12+
Activity name is required.
13+
</div>
1414
</div>
1515
</div>
1616

17-
<div class="input-group input-group-sm mb-3">
18-
<div class="input-group-prepend">
19-
<span class="input-group-text span-width">Description</span>
20-
</div>
17+
<div class="form-group">
18+
<label for="NotesTextarea">Description:</label>
2119
<textarea class="form-control" rows="2" id="description" type="text" formControlName="description"></textarea>
2220
</div>
2321

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="container">
1+
<div class="activity-container">
22
<app-create-activity></app-create-activity>
33
<app-activity-list></app-activity-list>
44
</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.activity-container{
2+
width: 100%;
3+
}
4+
5+
@media (min-width: 992px) {
6+
.activity-container{
7+
width: 70%;
8+
}
9+
}

0 commit comments

Comments
 (0)