Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(List): Update to v1 API #551

Merged
merged 12 commits into from
Oct 1, 2016
30 changes: 18 additions & 12 deletions docs/app/Components/ComponentDoc/ComponentDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ export default class ComponentDoc extends Component {
const { type, name } = seeMeta

return (
<Link key={description} to={`/${type}s/${_.kebabCase(name)}`} className='item'>
<List.Item as={Link} key={description} to={`/${type}s/${_.kebabCase(name)}`}>
{description}
</Link>
</List.Item>
)
})

// still render empty lists to reserve the whitespace
return (
<List className='small horizontal link' style={{ display: 'block' }}>
<List link horizontal size='small' style={{ display: 'block' }}>
<List.Item>
<Header size='tiny' color='grey'>
{seeLinks.length > 0 ? 'See:' : ' '}
Expand All @@ -118,10 +118,13 @@ export default class ComponentDoc extends Component {
if (META.isAddon(_meta)) return null

return (
<List.Item icon='book'>
<a href={getSemanticUIDocsUrl(_meta)} target='_blank'>
Semantic UI {_meta.parent || _meta.name} Docs
</a>
<List.Item>
<List.Icon name='book' />
<List.Content>
<a href={getSemanticUIDocsUrl(_meta)} target='_blank'>
Semantic UI {_meta.parent || _meta.name} Docs
</a>
</List.Content>
</List.Item>
)
}
Expand All @@ -132,10 +135,13 @@ export default class ComponentDoc extends Component {
// no matter the OS path separator, use '/' since these link to github
const posixPath = docPath.replace(pathSepRegEx, '/')
return (
<List.Item icon='github'>
<code>
<a href={getGithubSourceUrl(_meta.name)} target='_blank'>{posixPath}</a>
</code>
<List.Item>
<List.Icon name='github' />
<List.Content>
<code>
<a href={getGithubSourceUrl(_meta.name)} target='_blank'>{posixPath}</a>
</code>
</List.Content>
</List.Item>
)
}
Expand Down Expand Up @@ -228,7 +234,7 @@ export default class ComponentDoc extends Component {
<Grid.Column>
{this.renderHeader()}
{this.renderSee()}
<List className='link' style={linkListStyle}>
<List link style={linkListStyle}>
{this.renderGithubSourceLink()}
{this.renderSemanticDocsLink()}
</List>
Expand Down
42 changes: 0 additions & 42 deletions docs/app/Examples/elements/List/Content/ListContentExamples.js

This file was deleted.

23 changes: 0 additions & 23 deletions docs/app/Examples/elements/List/Content/ListDescriptionExample.js

This file was deleted.

39 changes: 39 additions & 0 deletions docs/app/Examples/elements/List/Content/ListExampleDescription.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react'
import { List } from 'stardust'

const ListExampleDescription = () => (
<List>
<List.Item>
<List.Icon name='map marker' />
<List.Content>
<List.Header as='a'>Krowlewskie Jadlo</List.Header>
<List.Description>An excellent polish restaurant, quick delivery and hearty, filling meals.</List.Description>
</List.Content>
</List.Item>
<List.Item>
<List.Icon name='map marker' />
<List.Content>
<List.Header as='a'>Xian Famous Foods</List.Header>
<List.Description>
A taste of Shaanxi's delicious culinary traditions, with delights like spicy cold noodles and lamb burgers.
</List.Description>
</List.Content>
</List.Item>
<List.Item>
<List.Icon name='map marker' />
<List.Content>
<List.Header as='a'>Sapporo Haru</List.Header>
<List.Description>Greenpoint's best choice for quick and delicious sushi.</List.Description>
</List.Content>
</List.Item>
<List.Item>
<List.Icon name='map marker' />
<List.Content>
<List.Header as='a'>Enid's</List.Header>
<List.Description>At night a bar, during the day a delicious brunch spot.</List.Description>
</List.Content>
</List.Item>
</List>
)

export default ListExampleDescription
25 changes: 25 additions & 0 deletions docs/app/Examples/elements/List/Content/ListExampleHeader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react'
import { List } from 'stardust'

const ListExampleHeader = () => (
<List>
<List.Item>
<List.Header>New York City</List.Header>
A lovely city
</List.Item>
<List.Item>
<List.Header>Chicago</List.Header>
Also quite a lovely city
</List.Item>
<List.Item>
<List.Header>Los Angeles</List.Header>
Sometimes can be a lovely city
</List.Item>
<List.Item>
<List.Header>San Francisco</List.Header>
What a lovely city
</List.Item>
</List>
)

export default ListExampleHeader
31 changes: 31 additions & 0 deletions docs/app/Examples/elements/List/Content/ListExampleIcon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react'
import { Icon, List } from 'stardust'

const ListExampleIcon = () => (
<List>
<List.Item as='a'>
<Icon name='help' />
<List.Content>
<List.Header>Floated Icon</List.Header>
<List.Description>
This text will always have a left margin to make sure it sits alongside your icon
</List.Description>
</List.Content>
</List.Item>
<List.Item as='a'>
<Icon name='right triangle' />
<List.Content>
<List.Header>Icon Alignment</List.Header>
<List.Description>
Floated icons are by default top aligned. To have an icon top aligned try this example.
</List.Description>
</List.Content>
</List.Item>
<List.Item>
<Icon name='help' />
Inline Text
</List.Item>
</List>
)

export default ListExampleIcon
44 changes: 44 additions & 0 deletions docs/app/Examples/elements/List/Content/ListExampleImage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react'
import { List, Image } from 'stardust'

const ListExampleImage = () => (
<List>
<List.Item>
<Image avatar src='http://semantic-ui.com/images/avatar2/small/rachel.png' />
<List.Content>
<List.Header as='a'>Rachel</List.Header>
<List.Description>Last seen watching <a><b>Arrested Development</b></a> just now.</List.Description>
</List.Content>
</List.Item>
<List.Item>
<Image avatar src='http://semantic-ui.com/images/avatar2/small/lindsay.png' />
<List.Content>
<List.Header as='a'>Lindsay</List.Header>
<List.Description>Last seen watching <a><b>Bob's Burgers</b></a> 10 hours ago.</List.Description>
</List.Content>
</List.Item>
<List.Item>
<Image avatar src='http://semantic-ui.com/images/avatar2/small/matthew.png' />
<List.Content>
<List.Header as='a'>Matthew</List.Header>
<List.Description>Last seen watching <a><b>The Godfather Part 2</b></a> yesterday.</List.Description>
</List.Content>
</List.Item>
<List.Item>
<Image avatar src='http://semantic-ui.com/images/avatar/small/jenny.jpg' />
<List.Content>
<List.Header as='a'>Jenny Hess</List.Header>
<List.Description>Last seen watching <a><b>Twin Peaks</b></a> 3 days ago.</List.Description>
</List.Content>
</List.Item>
<List.Item>
<Image avatar src='http://semantic-ui.com/images/avatar/small/veronika.jpg' />
<List.Content>
<List.Header as='a'>Veronika Ossi</List.Header>
<List.Description>Has not watched anything recently</List.Description>
</List.Content>
</List.Item>
</List>
)

export default ListExampleImage
12 changes: 12 additions & 0 deletions docs/app/Examples/elements/List/Content/ListExampleItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import { List } from 'stardust'

const ListExampleItem = () => (
<List>
<List.Item>1</List.Item>
<List.Item>2</List.Item>
<List.Item>3</List.Item>
</List>
)

export default ListExampleItem
12 changes: 12 additions & 0 deletions docs/app/Examples/elements/List/Content/ListExampleLink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import { List } from 'stardust'

const ListExampleLink = () => (
<List>
<List.Item as='a'>What is a FAQ?</List.Item>
<List.Item as='a'>Who is our user?</List.Item>
<List.Item as='a'>Where is our office located?</List.Item>
</List>
)

export default ListExampleLink
21 changes: 21 additions & 0 deletions docs/app/Examples/elements/List/Content/ListExampleLinkComplex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react'
import { List } from 'stardust'

const ListExampleLinkComplex = () => (
<List>
<List.Item>
<List.Header as='a'>Header</List.Header>
<List.Description>
Click a link in our <a>description</a>.
</List.Description>
</List.Item>
<List.Item>
<List.Header as='a'>Learn More</List.Header>
<List.Description>
Learn more about this site on <a>our FAQ page</a>.
</List.Description>
</List.Item>
</List>
)

export default ListExampleLinkComplex
14 changes: 0 additions & 14 deletions docs/app/Examples/elements/List/Content/ListHeaderExample.js

This file was deleted.

27 changes: 0 additions & 27 deletions docs/app/Examples/elements/List/Content/ListIconExample.js

This file was deleted.

18 changes: 0 additions & 18 deletions docs/app/Examples/elements/List/Content/ListImageExample.js

This file was deleted.

14 changes: 0 additions & 14 deletions docs/app/Examples/elements/List/Content/ListItemExample.js

This file was deleted.

Loading