Skip to content

Commit cede560

Browse files
dpkwhanlevithomason
authored andcommitted
style(Search): update docs to the latest standards (#840)
1 parent e4abc9e commit cede560

11 files changed

Lines changed: 81 additions & 62 deletions

docs/app/Examples/modules/Search/Types/Category.js renamed to docs/app/Examples/modules/Search/Types/SearchExampleCategory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const source = _.range(0, 3).reduce((memo, index) => {
2121
return memo
2222
}, {})
2323

24-
export default class SearchCategoryExample extends Component {
24+
export default class SearchExampleCategory extends Component {
2525
componentWillMount() {
2626
this.resetComponent()
2727
}

docs/app/Examples/modules/Search/Types/CategoryCustom.js renamed to docs/app/Examples/modules/Search/Types/SearchExampleCategoryCustom.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { PropTypes } from 'react'
22
import { Label } from 'semantic-ui-react'
33

4-
import BaseCategoryExample from './Category'
4+
import SearchExampleCategory from './SearchExampleCategory'
55

66
const categoryRenderer = ({ name }) =>
77
<Label as={'span'} content={name} />
@@ -19,11 +19,11 @@ resultRenderer.propTypes = {
1919
description: PropTypes.string,
2020
}
2121

22-
const SearchCategoryCustomExample = () => (
23-
<BaseCategoryExample
22+
const SearchExampleCategoryCustom = () => (
23+
<SearchExampleCategory
2424
categoryRenderer={categoryRenderer}
2525
resultRenderer={resultRenderer}
2626
/>
2727
)
2828

29-
export default SearchCategoryCustomExample
29+
export default SearchExampleCategoryCustom

docs/app/Examples/modules/Search/Types/Standard.js renamed to docs/app/Examples/modules/Search/Types/SearchExampleStandard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const source = _.times(5, () => ({
1010
price: faker.finance.amount(0, 100, 2, '$'),
1111
}))
1212

13-
export default class SearchStandardExample extends Component {
13+
export default class SearchExampleStandard extends Component {
1414
componentWillMount() {
1515
this.resetComponent()
1616
}

docs/app/Examples/modules/Search/Types/StandardCustom.js renamed to docs/app/Examples/modules/Search/Types/SearchExampleStandardCustom.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { PropTypes } from 'react'
22
import { Label } from 'semantic-ui-react'
33

4-
import BaseStandardExample from './Standard'
4+
import SearchExampleStandard from './SearchExampleStandard'
55

66
const resultRenderer = ({ title, description }) => (
77
<Label content={title} />
@@ -12,10 +12,8 @@ resultRenderer.propTypes = {
1212
description: PropTypes.string,
1313
}
1414

15-
const SearchStandardCustomExample = () => (
16-
<BaseStandardExample
17-
resultRenderer={resultRenderer}
18-
/>
15+
const SearchExampleStandardCustom = () => (
16+
<SearchExampleStandard resultRenderer={resultRenderer} />
1917
)
2018

21-
export default SearchStandardCustomExample
19+
export default SearchExampleStandardCustom
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from 'react'
2+
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
3+
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
4+
5+
const SearchTypesExamples = () => (
6+
<ExampleSection title='Types'>
7+
<ComponentExample
8+
title='Standard'
9+
description='A search can display a set of results.'
10+
examplePath='modules/Search/Types/SearchExampleStandard'
11+
/>
12+
<ComponentExample
13+
title='Standard (Custom Render)'
14+
description='A search can have a custom rendering.'
15+
examplePath='modules/Search/Types/SearchExampleStandardCustom'
16+
/>
17+
<ComponentExample
18+
title='Category'
19+
description='A search can display results from remote content ordered by categories.'
20+
examplePath='modules/Search/Types/SearchExampleCategory'
21+
/>
22+
<ComponentExample
23+
title='Category (Custom Render)'
24+
description='A category search can have a custom rendering.'
25+
examplePath='modules/Search/Types/SearchExampleCategoryCustom'
26+
/>
27+
</ExampleSection>
28+
)
29+
30+
export default SearchTypesExamples

docs/app/Examples/modules/Search/Variations/Aligned.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/app/Examples/modules/Search/Variations/Fluid.js

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react'
2+
3+
import SearchExampleStandard from '../Types/SearchExampleStandard'
4+
5+
const SearchExampleAligned = () => <SearchExampleStandard aligned='right' />
6+
7+
export default SearchExampleAligned
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
import SearchExampleStandard from '../Types/SearchExampleStandard'
4+
5+
const SearchExampleFluid = () => (
6+
<SearchExampleStandard fluid />
7+
)
8+
9+
export default SearchExampleFluid
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react'
2+
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
3+
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
4+
5+
const SearchVariationsExamples = () => (
6+
<ExampleSection title='Variations'>
7+
<ComponentExample
8+
title='Fluid'
9+
description='A search can have its results take up the width of its container.'
10+
examplePath='modules/Search/Variations/SearchExampleFluid'
11+
/>
12+
<ComponentExample
13+
title='Aligned'
14+
description='A search can have its results aligned to its left or right container edge.'
15+
examplePath='modules/Search/Variations/SearchExampleAligned'
16+
/>
17+
</ExampleSection>
18+
)
19+
20+
export default SearchVariationsExamples

0 commit comments

Comments
 (0)