Skip to content

Commit 1a854e7

Browse files
karatinayuangao
authored andcommitted
docs(list): add docs for md-list-icon (#3015)
1 parent fe113eb commit 1a854e7

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/lib/list/list.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,27 @@ as shown in the example).
6969
</md-list>
7070
```
7171

72+
### Lists with icons
73+
74+
To add an icon to your list item, use the `md-list-icon` attribute.
75+
76+
77+
```html
78+
<md-list>
79+
<md-list-item *ngFor="let message of messages">
80+
<md-icon md-list-icon>folder</md-icon>
81+
<h3 md-line> {{message.from}} </h3>
82+
<p md-line>
83+
<span> {{message.subject}} </span>
84+
<span class="demo-2"> -- {{message.content}} </span>
85+
</p>
86+
</md-list-item>
87+
</md-list>
88+
```
89+
7290
### Lists with avatars
73-
To include an avatar, add an image tag with an `md-list-avatar` attribute.
91+
92+
To include an avatar image, add an image tag with an `md-list-avatar` attribute.
7493

7594
```html
7695
<md-list>

0 commit comments

Comments
 (0)