Skip to content

Commit

Permalink
fix(Menu): label now fills width
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincharity committed Oct 25, 2019
1 parent ec7d6a6 commit f0a3131
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion terminus-ui/checkbox/src/checkbox.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,21 @@ $ts-select-item-height: 3em !default;
}

// Target checkboxes inside a material menu dropdown panel
.mat-menu-panel & {
.ts-menu__panel & {
// Match the material button line-height and spacing
.c-checkbox {
line-height: 2em;
padding: 0 spacing(default);
}

// By default the label doesn't fill the width even though the cursor signifies interaction
.mat-checkbox-layout {
width: 100%;
}

.mat-checkbox-label {
flex: 1;
}
}

// Target checkboxes inside a TsOptionComponent
Expand Down
2 changes: 2 additions & 0 deletions terminus-ui/menu/src/menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
[yPosition]="menuPositionY"
[xPosition]="menuPositionX"
[overlapTrigger]="shouldOverlapTrigger"
backdropClass="ts-menu__backdrop"
class="ts-menu__panel"
>
<ng-container [ngTemplateOutlet]="menuItemsTemplate"></ng-container>
</mat-menu>
Expand Down

0 comments on commit f0a3131

Please sign in to comment.