Skip to content

Commit 5f1ede2

Browse files
dpkwhanlevithomason
authored andcommitted
style(Statistic): update docs to the latest standards (#866)
1 parent 692b3ae commit 5f1ede2

22 files changed

+170
-178
lines changed

docs/app/Examples/views/Statistic/Content/Labels.js

Lines changed: 0 additions & 22 deletions
This file was deleted.
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 { Statistic } from 'semantic-ui-react'
3+
4+
const StatisticExampleLabels = () => (
5+
<div>
6+
<Statistic>
7+
<Statistic.Value>2,204</Statistic.Value>
8+
<Statistic.Label>Views</Statistic.Label>
9+
</Statistic>
10+
11+
<Statistic>
12+
<Statistic.Value value='2,204' />
13+
<Statistic.Label label='Views' />
14+
</Statistic>
15+
16+
<Statistic value='2,204' label='Views' />
17+
</div>
18+
)
19+
20+
export default StatisticExampleLabels

docs/app/Examples/views/Statistic/Content/Props.js renamed to docs/app/Examples/views/Statistic/Content/StatisticExampleProps.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const items = [
88
{ label: 'Team Members', value: '42' },
99
]
1010

11-
const Props = () => (
11+
const StatisticExampleProps = () => (
1212
<div>
1313
<Statistic.Group>
1414
<Statistic label='Saves' value='22' />
@@ -21,4 +21,4 @@ const Props = () => (
2121
</div>
2222
)
2323

24-
export default Props
24+
export default StatisticExampleProps
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react'
2+
import { Icon, Image, Statistic } from 'semantic-ui-react'
3+
4+
const StatisticExampleValues = () => (
5+
<Statistic.Group>
6+
<Statistic>
7+
<Statistic.Value>22</Statistic.Value>
8+
<Statistic.Label>Saves</Statistic.Label>
9+
</Statistic>
10+
11+
<Statistic>
12+
<Statistic.Value text>
13+
Three<br />
14+
Thousand
15+
</Statistic.Value>
16+
<Statistic.Label>Signups</Statistic.Label>
17+
</Statistic>
18+
19+
<Statistic>
20+
<Statistic.Value>
21+
<Icon name='plane' />
22+
5
23+
</Statistic.Value>
24+
<Statistic.Label>Flights</Statistic.Label>
25+
</Statistic>
26+
27+
<Statistic>
28+
<Statistic.Value>
29+
<Image src='http://semantic-ui.com/images/avatar/small/joe.jpg' inline shape='circular' />
30+
42
31+
</Statistic.Value>
32+
<Statistic.Label>Team Members</Statistic.Label>
33+
</Statistic>
34+
</Statistic.Group>
35+
)
36+
37+
export default StatisticExampleValues

docs/app/Examples/views/Statistic/Content/Values.js

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

docs/app/Examples/views/Statistic/Content/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const Content = () => (
77
<ExampleSection title='Content'>
88
<ComponentExample
99
title='Value'
10-
description='A statistic can contain a numeric, icon, image, or text value'
11-
examplePath='views/Statistic/Content/Values'
10+
description='A statistic can contain a numeric, icon, image, or text value.'
11+
examplePath='views/Statistic/Content/StatisticExampleValues'
1212
/>
13-
<ComponentExample examplePath='views/Statistic/Content/Props' />
13+
<ComponentExample examplePath='views/Statistic/Content/StatisticExampleProps' />
1414

1515
<ComponentExample
1616
title='Label'
17-
description='A statistic can contain a label to help provide context for the presented value'
18-
examplePath='views/Statistic/Content/Labels'
17+
description='A statistic can contain a label to help provide context for the presented value.'
18+
examplePath='views/Statistic/Content/StatisticExampleLabels'
1919
/>
2020
</ExampleSection>
2121
)

docs/app/Examples/views/Statistic/Types/Groups.js

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

docs/app/Examples/views/Statistic/Types/BottomLabel.js renamed to docs/app/Examples/views/Statistic/Types/StatisticExampleBottomLabel.js

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

4-
const BottomLabel = () => (
4+
const StatisticExampleBottomLabel = () => (
55
<div>
66
<Statistic>
77
<Statistic.Value>5,550</Statistic.Value>
@@ -12,4 +12,4 @@ const BottomLabel = () => (
1212
</div>
1313
)
1414

15-
export default BottomLabel
15+
export default StatisticExampleBottomLabel
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react'
2+
import { Statistic } from 'semantic-ui-react'
3+
4+
const items = [
5+
{ label: 'Faves', value: '22' },
6+
{ label: 'Views', value: '31,200' },
7+
{ label: 'Members', value: '22' },
8+
]
9+
10+
const StatisticExampleGroups = () => (
11+
<div>
12+
<Statistic.Group>
13+
<Statistic>
14+
<Statistic.Value>22</Statistic.Value>
15+
<Statistic.Label>Faves</Statistic.Label>
16+
</Statistic>
17+
<Statistic>
18+
<Statistic.Value>31,200</Statistic.Value>
19+
<Statistic.Label>Views</Statistic.Label>
20+
</Statistic>
21+
<Statistic label='Members' value='22' />
22+
</Statistic.Group>
23+
24+
<Statistic.Group items={items} />
25+
</div>
26+
)
27+
28+
export default StatisticExampleGroups
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { Statistic } from 'semantic-ui-react'
33

4-
const TopLabel = () => (
4+
const StatisticExampleTopLabel = () => (
55
<div>
66
<Statistic>
77
<Statistic.Label>Views</Statistic.Label>
@@ -10,4 +10,4 @@ const TopLabel = () => (
1010
</div>
1111
)
1212

13-
export default TopLabel
13+
export default StatisticExampleTopLabel

0 commit comments

Comments
 (0)