Skip to content

Commit e2f89c3

Browse files
committed
fix(list): update demo page
1 parent 977759e commit e2f89c3

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/components/list/list.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ based on whether the list is in "dense" mode.
5858
flex-direction: column;
5959
width: 100%;
6060
padding: 0 $md-list-side-padding;
61+
box-sizing: border-box;
62+
overflow: hidden;
6163

6264
&:first-child {
6365
padding: 0;
@@ -78,6 +80,7 @@ based on whether the list is in "dense" mode.
7880
[md-list-avatar] {
7981
width: $md-list-avatar-size;
8082
height: $md-list-avatar-size;
83+
border-radius: 50%;
8184
}
8285
}
8386

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ <h2>Normal lists</h2>
1515

1616
<md-list>
1717
<md-list-item *ngFor="#contact of contacts">
18-
<img md-list-avatar src="" alt="">
1918
<h3 md-line>{{contact.name}}</h3>
2019
<p md-line *ngIf="thirdLine">extra line</p>
2120
<p md-line class="demo-secondary-text">{{contact.headline}}</p>
@@ -24,6 +23,7 @@ <h3 md-line>{{contact.name}}</h3>
2423

2524
<md-list>
2625
<md-list-item *ngFor="#message of messages">
26+
<img md-list-avatar [src]="message.image" alt="Image of {{message.from}}">
2727
<h3 md-line>{{message.from}}</h3>
2828
<p md-line>
2929
<span>{{message.subject}} -- </span>
@@ -51,14 +51,14 @@ <h2>Dense lists</h2>
5151

5252
<md-list dense>
5353
<md-list-item *ngFor="#contact of contacts">
54-
<img md-list-avatar src="" alt="">
5554
<h3 md-line>{{contact.name}}</h3>
5655
<p md-line class="demo-secondary-text">{{contact.headline}}</p>
5756
</md-list-item>
5857
</md-list>
5958

6059
<md-list dense>
6160
<md-list-item *ngFor="#message of messages">
61+
<img md-list-avatar [src]="message.image" alt="Image of {{message.from}}">
6262
<h3 md-line>{{message.from}}</h3>
6363
<p md-line> {{message.subject}} </p>
6464
<p md-line class="demo-secondary-text">{{message.message}} </p>

src/demo-app/list/list-demo.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ export class ListDemo {
2525
{
2626
from: 'Nancy',
2727
subject: 'Brunch?',
28-
message: 'Did you want to go on Sunday? I was thinking that might work.'
28+
message: 'Did you want to go on Sunday? I was thinking that might work.',
29+
image: 'https://angular.io/resources/images/bios/julie-ralph.jpg'
2930
},
3031
{
3132
from: 'Mary',
3233
subject: 'Summer BBQ',
33-
message: 'Wish I could come, but I have some prior obligations.'
34+
message: 'Wish I could come, but I have some prior obligations.',
35+
image: 'https://angular.io/resources/images/bios/juleskremer.jpg'
3436
},
3537
{
3638
from: 'Bobby',
3739
subject: 'Oui oui',
38-
message: 'Do you have Paris reservations for the 15th? I just booked!'
40+
message: 'Do you have Paris reservations for the 15th? I just booked!',
41+
image: 'https://angular.io/resources/images/bios/jelbourn.jpg'
3942
}
4043
];
4144

0 commit comments

Comments
 (0)