Skip to content

Commit

Permalink
docs(material/list): add example of line scenarios with checkbox
Browse files Browse the repository at this point in the history
Add example of line scenarios with checkbox.
  • Loading branch information
zarend committed Feb 6, 2024
1 parent 53a79aa commit cbb314f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/dev-app/list/list-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,31 @@ <h2>Line scenarios</h2>
</mat-list-item>
</mat-list>

<mat-selection-list>
<mat-list-option>Title</mat-list-option>
<mat-list-option lines="2">
<span matListItemTitle>Title</span>
<span>This is unscoped text content that is supposed to not wrap. The list has only
acquired two lines and therefore there is no space for wrapping.</span>
</mat-list-option>
<mat-list-option lines="3">
<span matListItemTitle>Title</span>
<span>This is unscoped text content that is supposed to wrap to the third line.
The list item acquire spaces for three lines and text should have an ellipsis in the
third line upon text overflow.</span>
</mat-list-option>
<mat-list-option>
<span matListItemTitle>Title</span>
<span>This is unscoped text content that is supposed to not wrap. The list has only
acquired two lines (automatically) and therefore there is no space for wrapping.</span>
</mat-list-option>
<mat-list-option>
<span matListItemTitle>Title</span>
<span matListItemLine>Secondary line</span>
<span matListItemLine>Tertiary line</span>
</mat-list-option>
</mat-selection-list>

<button mat-raised-button (click)="showBoxes = !showBoxes">Show item boxes</button>
</div>

Expand Down

0 comments on commit cbb314f

Please sign in to comment.