Skip to content

Commit 44ddeaa

Browse files
kyleturcolevithomason
authored andcommitted
start transition to ListItem
1 parent 3e16840 commit 44ddeaa

10 files changed

Lines changed: 157 additions & 15 deletions

docs/app/Examples/elements/List/Content/ListHeaderExample.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
import React, {Component} from 'react';
2-
import {List} from 'stardust';
2+
import {List, ListItem} from 'stardust';
33

44
export default class ListHeaderExample extends Component {
55
render() {
66
return (
77
<List>
8-
<div className='item'>
9-
<div className='header'>Chapter 1</div>
10-
The chapter in which we meet the characters
11-
</div>
12-
<div className='item'>
13-
<div className='header'>Chapter 2</div>
14-
The chapter in which the bad guy is introduced
15-
</div>
16-
<div className='item'>
17-
<div className='header'>Chapter 3</div>
18-
Spoiler alert: The chapter in which the good guy wins!
19-
</div>
8+
<ListItem header='Chapter 1' description='The chapter in which we meet the characters' />
9+
<ListItem header='Chapter 2' description='The chapter in which the bad guy is introduced' />
10+
<ListItem header='Chapter 3' description='Spoiler alert: The chapter in which the good guy wins!'/>
2011
</List>
2112
);
2213
}

docs/app/Examples/elements/List/Variations/ListHorizontalExample.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,26 @@ export default class ListHorizontalExample extends Component {
66
return (
77
<List className='horizontal'>
88
<Item>
9-
<img className='ui avatar image' src='/images/avatar/small/tom.jpg' />
9+
<img className='ui avatar image' src='http://lorempixel.com/100/100/city/1' />
1010
<div className='content'>
11-
<a className='header'>Chicago, IL></a>
11+
<a className='header'>Chicago</a>
1212
<div className='description'> This city is located in the state of Illinois</div>
1313
</div>
1414
</Item>
15+
<Item>
16+
<img className='ui avatar image' src='http://lorempixel.com/100/100/city/2' />
17+
<div className='content'>
18+
<a className='header'>Indianapolis</a>
19+
<div className='description'> This city is located in the state of Indiana</div>
20+
</div>
21+
</Item>
22+
<Item>
23+
<img className='ui avatar image' src='http://lorempixel.com/100/100/city/3' />
24+
<div className='content'>
25+
<a className='header'>Nashville</a>
26+
<div className='description'> This city is located in the state of Tennessee</div>
27+
</div>
28+
</Item>
1529
</List>
1630
);
1731
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, {Component} from 'react';
2+
import {List, ListItem} from 'stardust';
3+
4+
export default class ListSizeBigExample extends Component {
5+
render() {
6+
const helenAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7+
const christianAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8+
const danielAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9+
10+
return (
11+
<List className='big horizontal divided'>
12+
<ListItem image={helenAvatar} header='Helen' />
13+
<ListItem image={christianAvatar} header='Christian' />
14+
<ListItem image={danielAvatar} header='Daniel' />
15+
</List>
16+
);
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, {Component} from 'react';
2+
import {List, ListItem} from 'stardust';
3+
4+
export default class ListSizeHugeExample extends Component {
5+
render() {
6+
const helenAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7+
const christianAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8+
const danielAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9+
10+
return (
11+
<List className='huge horizontal divided'>
12+
<ListItem image={helenAvatar} header='Helen' />
13+
<ListItem image={christianAvatar} header='Christian' />
14+
<ListItem image={danielAvatar} header='Daniel' />
15+
</List>
16+
);
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, {Component} from 'react';
2+
import {List, ListItem} from 'stardust';
3+
4+
export default class ListSizeLargeExample extends Component {
5+
render() {
6+
const helenAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7+
const christianAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8+
const danielAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9+
10+
return (
11+
<List className='large horizontal divided'>
12+
<ListItem image={helenAvatar} header='Helen' />
13+
<ListItem image={christianAvatar} header='Christian' />
14+
<ListItem image={danielAvatar} header='Daniel' />
15+
</List>
16+
);
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, {Component} from 'react';
2+
import {List, ListItem} from 'stardust';
3+
4+
export default class ListSizeMassiveExample extends Component {
5+
render() {
6+
const helenAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7+
const christianAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8+
const danielAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9+
10+
return (
11+
<List className='massive horizontal divided'>
12+
<ListItem image={helenAvatar} header='Helen' />
13+
<ListItem image={christianAvatar} header='Christian' />
14+
<ListItem image={danielAvatar} header='Daniel' />
15+
</List>
16+
);
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, {Component} from 'react';
2+
import {List, ListItem} from 'stardust';
3+
4+
export default class ListSizeMiniExample extends Component {
5+
render() {
6+
const helenAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7+
const christianAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8+
const danielAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9+
10+
return (
11+
<List className='mini horizontal divided'>
12+
<ListItem image={helenAvatar} header='Helen' />
13+
<ListItem image={christianAvatar} header='Christian' />
14+
<ListItem image={danielAvatar} header='Daniel' />
15+
</List>
16+
);
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, {Component} from 'react';
2+
import {List, ListItem} from 'stardust';
3+
4+
export default class ListSizeSmallExample extends Component {
5+
render() {
6+
const helenAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7+
const christianAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8+
const danielAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9+
10+
return (
11+
<List className='small horizontal divided'>
12+
<ListItem image={helenAvatar} header='Helen' />
13+
<ListItem image={christianAvatar} header='Christian' />
14+
<ListItem image={danielAvatar} header='Daniel' />
15+
</List>
16+
);
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, {Component} from 'react';
2+
import {List, ListItem} from 'stardust';
3+
4+
export default class ListSizeTinyExample extends Component {
5+
render() {
6+
const helenAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7+
const christianAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8+
const danielAvatar = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9+
10+
return (
11+
<List className='tiny horizontal divided'>
12+
<ListItem image={helenAvatar} header='Helen' />
13+
<ListItem image={christianAvatar} header='Christian' />
14+
<ListItem image={danielAvatar} header='Daniel' />
15+
</List>
16+
);
17+
}
18+
}

docs/app/Examples/elements/List/Variations/ListVariationsExamples.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ export default class ListVariationsExamples extends Component {
4141
description='A list can divide its items into cells'
4242
examplePath='elements/List/Variations/ListCelledExample'
4343
/>
44+
<ComponentExample
45+
title='Size'
46+
description='A list can vary in size'
47+
examplePath='elements/List/Variations/ListSizeMiniExample'
48+
/>
49+
<ComponentExample examplePath='elements/List/Variations/ListSizeTinyExample' />
50+
<ComponentExample examplePath='elements/List/Variations/ListSizeSmallExample' />
51+
<ComponentExample examplePath='elements/List/Variations/ListSizeLargeExample' />
52+
<ComponentExample examplePath='elements/List/Variations/ListSizeBigExample' />
53+
<ComponentExample examplePath='elements/List/Variations/ListSizeHugeExample' />
54+
<ComponentExample examplePath='elements/List/Variations/ListSizeMassiveExample' />
4455
</ExampleSection>
4556
);
4657
}

0 commit comments

Comments
 (0)