Skip to content

Commit 3e16840

Browse files
kyleturcolevithomason
authored andcommitted
add content and variations examples
1 parent 6bc782f commit 3e16840

19 files changed

Lines changed: 427 additions & 17 deletions
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import React, {Component} from 'react';
2+
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample';
3+
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection';
4+
5+
export default class ListContentExamples extends Component {
6+
render() {
7+
return (
8+
<ExampleSection title='Content'>
9+
<ComponentExample
10+
title='Item'
11+
description='A list item can contain a set of items'
12+
examplePath='elements/List/Content/ListItemExample'
13+
/>
14+
<ComponentExample
15+
title='Icon'
16+
description='A list item can contain an icon'
17+
examplePath='elements/List/Content/ListIconExample'
18+
/>
19+
<ComponentExample
20+
title='Image'
21+
description='A list can contain an image'
22+
examplePath='elements/List/Content/ListImageExample'
23+
/>
24+
<ComponentExample
25+
title='Link'
26+
description='A list can contain links'
27+
examplePath='elements/List/Content/ListLinkExample'
28+
/>
29+
<ComponentExample
30+
title='Header'
31+
description='A list can contain a header'
32+
examplePath='elements/List/Content/ListHeaderExample'
33+
/>
34+
<ComponentExample
35+
title='Description'
36+
description='A list can contain a description'
37+
examplePath='elements/List/Content/ListDescriptionExample'
38+
/>
39+
</ExampleSection>
40+
);
41+
}
42+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React, {Component} from 'react';
2+
import {List, Item} from 'stardust';
3+
4+
export default class ListDescriptionExample extends Component {
5+
render() {
6+
return (
7+
<List>
8+
<Item>
9+
<i className='map marker icon' />
10+
<div className='content'>
11+
<a className='header'>Chicago, IL></a>
12+
<div className='description'> This city is located in the state of Illinois</div>
13+
</div>
14+
</Item>
15+
<Item>
16+
<i className='map marker icon' />
17+
<div className='content'>
18+
<a className='header'>Nashville, TN></a>
19+
<div className='description'> This city is located in the state of Tennessee</div>
20+
</div>
21+
</Item>
22+
</List>
23+
);
24+
}
25+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React, {Component} from 'react';
2+
import {List} from 'stardust';
3+
4+
export default class ListHeaderExample extends Component {
5+
render() {
6+
return (
7+
<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>
20+
</List>
21+
);
22+
}
23+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React, {Component} from 'react';
2+
import {List} from 'stardust';
3+
4+
export default class ListIconExample extends Component {
5+
render() {
6+
return (
7+
<List>
8+
<a className='item'>
9+
<i className='help icon' />
10+
<div className='content'>
11+
<div className='header'>Floated Icon</div>
12+
<div className='description'>This text will always have a left margin so it sits alongside the icon</div>
13+
</div>
14+
</a>
15+
<a className='item'>
16+
<i className='right triangle icon' />
17+
<div className='content'>
18+
<div className='header'>Icon Alignment</div>
19+
<div className='description'>Floated icons are by default top aligned</div>
20+
</div>
21+
</a>
22+
<div className='item'>
23+
<i className='help icon' />
24+
<div className='content'>
25+
Inline Text
26+
</div>
27+
</div>
28+
</List>
29+
);
30+
}
31+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React, {Component} from 'react';
2+
import {List} from 'stardust';
3+
4+
export default class ListImageExample extends Component {
5+
render() {
6+
return (
7+
<List />
8+
);
9+
}
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React, {Component} from 'react';
2+
import {List, Item} from 'stardust';
3+
4+
export default class ListItemExample extends Component {
5+
render() {
6+
return (
7+
<List>
8+
<Item>1</Item>
9+
<Item>2</Item>
10+
<Item>3</Item>
11+
</List>
12+
);
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React, {Component} from 'react';
2+
import {List} from 'stardust';
3+
4+
export default class ListLinkExample extends Component {
5+
render() {
6+
return (
7+
<List>
8+
<a className='item'>What is a FAQ?</a>
9+
<a className='item'>Who is our user base?</a>
10+
<a className='item'>Where is our office located?</a>
11+
</List>
12+
);
13+
}
14+
}

docs/app/Examples/elements/List/ListExamples.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import React, {Component} from 'react';
22
import ListTypesExamples from './Types/ListTypesExamples';
3-
// import InputStatesExamples from './States/InputStatesExamples';
4-
// import InputVariationsExamples from './Variations/InputVariationsExamples';
3+
import ListContentExamples from './Content/ListContentExamples';
4+
import ListVariationsExamples from './Variations/ListVariationsExamples';
55

66
export default class ListExamples extends Component {
77
render() {
88
return (
99
<div>
1010
<ListTypesExamples />
11+
<ListContentExamples />
12+
<ListVariationsExamples />
1113
</div>
1214
);
1315
}

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

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

44
export default class ListBulletedExample extends Component {
55
render() {
66
return (
77
<List className='bulleted'>
8-
<div className='item'>Apples</div>
9-
<div className='item'>Pears</div>
10-
<div className='item'>Oranges</div>
8+
<Item>Apples</Item>
9+
<Item>Pears</Item>
10+
<Item>Oranges</Item>
1111
</List>
1212
);
1313
}

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

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

44
export default class ListListExample extends Component {
55
render() {
66
return (
77
<List>
8-
<div className='item'>Apples</div>
9-
<div className='item'>Pears</div>
10-
<div className='item'>Oranges</div>
8+
<Item>Apples</Item>
9+
<Item>Pears</Item>
10+
<Item>Oranges</Item>
1111
</List>
1212
);
1313
}

0 commit comments

Comments
 (0)