Skip to content

Commit f3e487d

Browse files
committed
docs(material/list): add example of line scenarios with checkbox
Add example of line scenarios with checkbox.
1 parent b4b91be commit f3e487d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/dev-app/list/list-demo.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,31 @@ <h2>Line scenarios</h2>
243243
</mat-list-item>
244244
</mat-list>
245245

246+
<mat-selection-list>
247+
<mat-list-option>Title</mat-list-option>
248+
<mat-list-option lines="2">
249+
<span matListItemTitle>Title</span>
250+
<span>This is unscoped text content that is supposed to not wrap. The list has only
251+
acquired two lines and therefore there is no space for wrapping.</span>
252+
</mat-list-option>
253+
<mat-list-option lines="3">
254+
<span matListItemTitle>Title</span>
255+
<span>This is unscoped text content that is supposed to wrap to the third line.
256+
The list item acquire spaces for three lines and text should have an ellipsis in the
257+
third line upon text overflow.</span>
258+
</mat-list-option>
259+
<mat-list-option>
260+
<span matListItemTitle>Title</span>
261+
<span>This is unscoped text content that is supposed to not wrap. The list has only
262+
acquired two lines (automatically) and therefore there is no space for wrapping.</span>
263+
</mat-list-option>
264+
<mat-list-option>
265+
<span matListItemTitle>Title</span>
266+
<span matListItemLine>Secondary line</span>
267+
<span matListItemLine>Tertiary line</span>
268+
</mat-list-option>
269+
</mat-selection-list>
270+
246271
<button mat-raised-button (click)="showBoxes = !showBoxes">Show item boxes</button>
247272
</div>
248273

0 commit comments

Comments
 (0)