Skip to content

Commit

Permalink
if lg members or subgroups is empty, add css class and remove padding
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Aug 9, 2024
1 parent 102119a commit 667f037
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/app/components/learner-group/members.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{#let (unique-id) as |templateId|}}
<div
class="learner-group-members"
class="learner-group-members{{if (eq this.usersInGroup.length 0) " empty"}}"
data-test-learner-group-members
>
{{#if this.usersInGroup.length}}
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/app/components/learner-group/root.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
</div>
{{/if}}
</div>
<div class="list">
<div class="list{{if (eq @learnerGroup.childrenCount 0) " empty"}}">
{{#if @learnerGroup.childrenCount}}
<LearnerGroup::List
@learnerGroups={{this.learnerGroups}}
Expand Down
4 changes: 4 additions & 0 deletions packages/frontend/app/styles/components/programs/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

.list {
@include m.main-list-box-table;

&.empty {
padding: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
margin: 0;
min-height: 2rem;
padding: 1rem 0;

&.empty {
min-height: auto;
padding-bottom: 0;
}
}

@mixin detail-container-title-style() {
Expand Down

0 comments on commit 667f037

Please sign in to comment.