Skip to content

Commit 606e507

Browse files
committed
try something
1 parent d684ef6 commit 606e507

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/material/slide-toggle/slide-toggle.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@
5353
</span>
5454
</button>
5555

56-
@if (!hideLabel) {
5756
<!--
5857
Clicking on the label will trigger another click event from the button.
5958
Stop propagation here so other listeners further up in the DOM don't execute twice.
6059
-->
6160
<label class="mdc-label" [for]="buttonId" [attr.id]="_labelId" (click)="$event.stopPropagation()">
6261
<ng-content></ng-content>
6362
</label>
64-
}
6563
</div>

src/material/slide-toggle/slide-toggle.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ $fallbacks: m3-slide-toggle.get-tokens();
3333
}
3434
}
3535

36+
label:empty {
37+
display: none;
38+
}
39+
3640
.mdc-switch__track {
3741
overflow: hidden;
3842
position: relative;

0 commit comments

Comments
 (0)