Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 90d3719

Browse files
authored
docs: remove Usage tab (#1948)
* remove Usage tab * update changelog
1 parent 5f21b8f commit 90d3719

40 files changed

Lines changed: 58 additions & 93 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
3232
- Add support for radio & checkbox groups to `Toolbar` component @layershifter ([#1920](https://github.com/stardust-ui/react/pull/1920))
3333
- Add support for `Popup` in `ToolbarMenu` @lucivpav ([#1927](https://github.com/stardust-ui/react/pull/1927))
3434

35+
### Documentation
36+
- Remove Usage tab @lucivpav ([#1948](https://github.com/stardust-ui/react/pull/1948))
37+
3538
<!--------------------------------[ v0.38.1 ]------------------------------- -->
3639
## [v0.38.1](https://github.com/stardust-ui/react/tree/v0.38.1) (2019-09-13)
3740
[Compare changes](https://github.com/stardust-ui/react/compare/v0.38.0...v0.38.1)

docs/src/components/ComponentDoc/ComponentDoc.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { getFormattedHash } from 'docs/src/utils'
66
import ComponentDocLinks from './ComponentDocLinks'
77
import ComponentDocSee from './ComponentDocSee'
88
import { ComponentExamples } from './ComponentExamples'
9-
import { ComponentUsage } from './ComponentUsage'
109
import ComponentProps from './ComponentProps'
1110
import { ComponentDocAccessibility } from './ComponentDocAccessibility'
1211
import { ThemeContext } from 'docs/src/context/ThemeContext'
@@ -234,31 +233,6 @@ class ComponentDoc extends React.Component<ComponentDocProps, ComponentDocState>
234233
</>
235234
)}
236235

237-
{this.getCurrentTabTitle() === 'Usage' && (
238-
<Grid columns="auto 300px" styles={{ justifyContent: 'normal', justifyItems: 'stretch' }}>
239-
<div>
240-
<ExampleContext.Provider
241-
value={{
242-
activeAnchorName: activePath,
243-
onExamplePassed: this.handleExamplePassed,
244-
}}
245-
>
246-
<ComponentUsage displayName={info.displayName} />
247-
</ExampleContext.Provider>
248-
</div>
249-
{/* TODO: bring back the right floating menu
250-
<Box styles={{ width: '25%', paddingLeft: '14px' }}>
251-
<ComponentSidebar
252-
activePath={activePath}
253-
displayName={info.displayName}
254-
examplesRef={examplesRef}
255-
onItemClick={this.handleSidebarItemClick}
256-
/>
257-
</Box>
258-
*/}
259-
</Grid>
260-
)}
261-
262236
<div style={exampleEndStyle}>
263237
This is the bottom <Icon name="pointing down" />
264238
</div>

docs/src/components/ComponentDoc/ComponentUsage.tsx

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

docs/src/components/DocsRoot.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as React from 'react'
55
import ComponentDoc from '../components/ComponentDoc'
66
import PageNotFound from '../views/PageNotFound'
77
import componentInfoContext from '../utils/componentInfoContext'
8-
import { containsUsage } from './ComponentDoc/ComponentUsage'
98
import { containsAccessibility } from './ComponentDoc/ComponentDocAccessibility'
109

1110
class DocsRoot extends React.Component<any, any> {
@@ -24,10 +23,6 @@ class DocsRoot extends React.Component<any, any> {
2423
getNonEmptyTabs(info) {
2524
const tabs = ['Definition']
2625

27-
if (containsUsage(info.displayName)) {
28-
tabs.push('Usage')
29-
}
30-
3126
tabs.push('Props')
3227

3328
if (containsAccessibility(info)) {

docs/src/examples/components/Accordion/Usage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
33
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'
44

55
const Usage = () => (
6-
<ExampleSection title="">
6+
<ExampleSection title="Usage">
77
<ComponentExample
88
title="Custom panel title"
99
description="Accordion panel's title can be customized."

docs/src/examples/components/Accordion/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import * as React from 'react'
22

33
import Rtl from './Rtl'
44
import Types from './Types'
5+
import Usage from './Usage'
56

67
const AccordionExamples = () => (
78
<>
89
<Types />
910
<Rtl />
11+
<Usage />
1012
</>
1113
)
1214

docs/src/examples/components/Alert/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Types from './Types'
55
import Slots from './Slots'
66
import State from './State'
77
import Variations from './Variations'
8+
import Usage from './Usage'
89

910
const AlertExamples = () => (
1011
<>
@@ -13,6 +14,7 @@ const AlertExamples = () => (
1314
<State />
1415
<Slots />
1516
<Rtl />
17+
<Usage />
1618
</>
1719
)
1820

docs/src/examples/components/Avatar/Usage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
33
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'
44

55
const Usage = () => (
6-
<ExampleSection title="">
6+
<ExampleSection title="Usage">
77
<ComponentExample
88
title="Match Background Example"
99
description="The status border for avatar should be set to match whatever background it is on."

docs/src/examples/components/Avatar/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import * as React from 'react'
33
import Rtl from './Rtl'
44
import Types from './Types'
55
import Variations from './Variations'
6+
import Usage from './Usage'
67

78
const AvatarExamples = () => (
89
<>
910
<Types />
1011
<Variations />
1112
<Rtl />
13+
<Usage />
1214
</>
1315
)
1416

docs/src/examples/components/Button/Usage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
44
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'
55

66
const Usage = () => (
7-
<ExampleSection title="">
7+
<ExampleSection title="Usage">
88
<ComponentExample
99
title="Content and Icon"
1010
description="A button can have an icon in addition to content."

0 commit comments

Comments
 (0)