Skip to content

Commit 16dcb04

Browse files
kyleturcolevithomason
authored andcommitted
add content and variations examples
1 parent 29e50e4 commit 16dcb04

10 files changed

Lines changed: 45 additions & 54 deletions

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ export default class ListIconExample extends Component {
99
return (
1010
<List>
1111
<ListItem
12-
image={helpIcon}
12+
icon={helpIcon}
1313
header='Floated Icon'
1414
description='This text will always have a left margin so it sits alongside the icon'
1515
/>
1616
<ListItem
17-
image={triangleIcon}
17+
icon={triangleIcon}
1818
header='Icon Alignment'
1919
description='Floated icons are by default top aligned'
2020
/>
21-
<ListItem image={helpIcon}>
22-
Inline Text
21+
<ListItem icon={helpIcon}>
22+
This item uses <code>child</code> text, check the code.
2323
</ListItem>
2424
</List>
2525
);

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import faker from 'faker';
12
import React, {Component} from 'react';
23
import {List, ListItem} from 'stardust';
34

45
export default class ListImageExample extends Component {
56
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' />;
7+
const helenAvatar = <Image className='avatar' src={faker.image.internet.avatar()} />;
8+
const christianAvatar = <Image className='avatar' src={faker.image.internet.avatar()} />;
9+
const danielAvatar = <Image className='avatar' src={faker.image.internet.avatar()} />;
910
return (
1011
<List>
1112
<ListItem image={helenAvatar} header='Helen' />

docs/app/Examples/elements/List/Types/ListLinkExample.js

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

54
export default class ListLinkExample extends Component {
@@ -14,18 +13,6 @@ export default class ListLinkExample extends Component {
1413
<ListItem description={link2} />
1514
<ListItem description={link3} />
1615
<ListItem description={link4} />
17-
=======
18-
import {List} from 'stardust';
19-
20-
export default class ListBulletedExample extends Component {
21-
render() {
22-
return (
23-
<List className='link'>
24-
<div className='active item'>Home</div>
25-
<a className='item'>About</a>
26-
<a className='item'>Services</a>
27-
<a className='item'>Careers</a>
28-
>>>>>>> add list types examples
2916
</List>
3017
);
3118
}
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1+
import faker from 'faker';
12
import React, {Component} from 'react';
2-
import {List, ListItem, Message} from 'stardust';
3+
import {List, ListItem, Image} from 'stardust';
34

45
export default class ListAnimatedExample extends Component {
56
render() {
6-
const avatar1 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7-
const avatar2 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8-
const avatar3 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
7+
const avatar1 = <Image className='avatar' src={faker.internet.avatar()} />;
8+
const avatar2 = <Image className='avatar' src={faker.internet.avatar()} />;
9+
const avatar3 = <Image className='avatar' src={faker.internet.avatar()} />;
910
return (
10-
<div>
11-
<Message className='info'>
12-
Be sure content can fit on one line, otherwise text content will reflow when hovered.
13-
</Message>
14-
<List className='middle aligned animated'>
15-
<ListItem image={avatar1} header='Helen' />
16-
<ListItem image={avatar2} header='Christian' />
17-
<ListItem image={avatar3} header='Daniel' />
18-
</List>
19-
</div>
11+
<List className='middle aligned animated'>
12+
<ListItem image={avatar1} header='Helen' />
13+
<ListItem image={avatar2} header='Christian' />
14+
<ListItem image={avatar3} header='Daniel' />
15+
</List>
2016
);
2117
}
2218
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import faker from 'faker';
12
import React, {Component} from 'react';
2-
import {List, ListItem} from 'stardust';
3+
import {List, ListItem, Image} from 'stardust';
34

45
export default class ListCelledExample extends Component {
56
render() {
6-
const avatar1 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7-
const avatar2 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8-
const avatar3 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9-
7+
const avatar1 = <Image className='avatar' src={faker.internet.avatar()} />;
8+
const avatar2 = <Image className='avatar' src={faker.internet.avatar()} />;
9+
const avatar3 = <Image className='avatar' src={faker.internet.avatar()} />;
1010
return (
1111
<List className='celled'>
1212
<ListItem image={avatar1} header='Helen' />

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import faker from 'faker';
12
import React, {Component} from 'react';
23
import {List, ListItem} from 'stardust';
34

45
export default class ListDividedExample extends Component {
56
render() {
6-
const avatar1 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7-
const avatar2 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8-
const avatar3 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
9-
7+
const avatar1 = <Image className='avatar' src={faker.internet.avatar()} />;
8+
const avatar2 = <Image className='avatar' src={faker.internet.avatar()} />;
9+
const avatar3 = <Image className='avatar' src={faker.internet.avatar()} />;
1010
return (
1111
<List className='middle aligned divided'>
1212
<ListItem image={avatar1} header='Helen' />

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import faker from 'faker';
12
import React, {Component} from 'react';
23
import {List, ListItem} from 'stardust';
34

45
export default class ListHorizontalExample extends Component {
56
render() {
6-
const image1 = <img className='ui avatar image' src='http://lorempixel.com/100/100/city/1' />;
7-
const image2 = <img className='ui avatar image' src='http://lorempixel.com/100/100/city/2' />;
8-
const image3 = <img className='ui avatar image' src='http://lorempixel.com/100/100/city/3' />;
9-
7+
const image1 = <Image className='avatar' src={faker.image.city(100, 100)} />;
8+
const image2 = <Image className='avatar' src={faker.image.city(100, 100)} />;
9+
const image3 = <Image className='avatar' src={faker.image.city(100, 100)} />;
1010
return (
1111
<List className='horizontal'>
1212
<ListItem image={image1} header='Chicago' description='This city is located in the state of Illinois' />

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import faker from 'faker';
12
import React, {Component} from 'react';
23
import {List, ListItem} from 'stardust';
34

45
export default class ListRelaxedExample extends Component {
56
render() {
6-
const avatar1 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7-
const avatar2 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8-
const avatar3 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
7+
const avatar1 = <Image className='avatar' src={faker.internet.avatar()} />;
8+
const avatar2 = <Image className='avatar' src={faker.internet.avatar()} />;
9+
const avatar3 = <Image className='avatar' src={faker.internet.avatar()} />;
910
return (
1011
<List className='relaxed'>
1112
<ListItem image={avatar1} header='Helen' />

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import faker from 'faker';
12
import React, {Component} from 'react';
23
import {List, ListItem} from 'stardust';
34

45
export default class ListSelectionExample extends Component {
56
render() {
6-
const avatar1 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/1' />;
7-
const avatar2 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/2' />;
8-
const avatar3 = <img className='ui avatar image' src='http://lorempixel.com/100/100/people/3' />;
7+
const avatar1 = <Image className='avatar' src={faker.internet.avatar()} />;
8+
const avatar2 = <Image className='avatar' src={faker.internet.avatar()} />;
9+
const avatar3 = <Image className='avatar' src={faker.internet.avatar()} />;
910
return (
1011
<List className='selection'>
1112
<ListItem image={avatar1} header='Helen' />

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, {Component} from 'react';
22
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample';
33
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection';
4+
import {Message} from 'stardust';
45

56
export default class ListVariationsExamples extends Component {
67
render() {
@@ -25,7 +26,11 @@ export default class ListVariationsExamples extends Component {
2526
title='Animated'
2627
description='A list can animate to set the current item apart from the list'
2728
examplePath='elements/List/Variations/ListAnimatedExample'
28-
/>
29+
>
30+
<Message className='info'>
31+
Be sure content can fit on one line, otherwise text content will reflow when hovered.
32+
</Message>
33+
</ComponentExample>
2934
<ComponentExample
3035
title='Relaxed'
3136
description='A list can relax its padding to provide more negative space'

0 commit comments

Comments
 (0)