@@ -13,11 +13,11 @@ interface ComponentExamplesProps {
13
13
}
14
14
15
15
export default class ComponentExamples extends React . Component < ComponentExamplesProps , any > {
16
- public static propTypes = {
16
+ static propTypes = {
17
17
displayName : PropTypes . string . isRequired ,
18
18
}
19
19
20
- public render ( ) {
20
+ render ( ) {
21
21
return this . renderExamples ( ) || this . renderMissingExamples ( )
22
22
}
23
23
@@ -29,7 +29,7 @@ export default class ComponentExamples extends React.Component<ComponentExamples
29
29
* 2. for every ./docs/src/components/{...}/{...}MyComponent{...}Example{...}.tsx there needs to be a shorthand version of it:
30
30
* ./docs/src/components/{...}/{...}MyComponent{...}Example{...}.shorthand.tsx
31
31
*/
32
- private renderExamples = ( ) : JSX . Element | null => {
32
+ renderExamples = ( ) : JSX . Element | null => {
33
33
const { displayName } = this . props
34
34
35
35
// rule #1
@@ -56,7 +56,7 @@ export default class ComponentExamples extends React.Component<ComponentExamples
56
56
)
57
57
}
58
58
59
- private renderMissingExamples = ( ) => {
59
+ renderMissingExamples = ( ) => {
60
60
const { displayName } = this . props
61
61
62
62
return this . renderElementWrappedInGrid (
@@ -66,7 +66,7 @@ export default class ComponentExamples extends React.Component<ComponentExamples
66
66
)
67
67
}
68
68
69
- private renderMissingShorthandExamples = ( missingPaths : string [ ] ) => {
69
+ renderMissingShorthandExamples = ( missingPaths : string [ ] ) => {
70
70
return this . renderElementWrappedInGrid (
71
71
< ContributionPrompt >
72
72
< div > Looks like we're missing examples at following paths:</ div >
@@ -75,9 +75,9 @@ export default class ComponentExamples extends React.Component<ComponentExamples
75
75
)
76
76
}
77
77
78
- private renderElementWrappedInGrid = ( Element : JSX . Element ) => < Segment content = { Element } />
78
+ renderElementWrappedInGrid = ( Element : JSX . Element ) => < Segment content = { Element } />
79
79
80
- private getMissingExamplePaths ( displayName : string , allPaths : string [ ] ) : string [ ] {
80
+ getMissingExamplePaths ( displayName : string , allPaths : string [ ] ) : string [ ] {
81
81
const examplesPattern = `\./${ displayName } /[\\w/]+Example`
82
82
const [ normalExtension , shorthandExtension ] = [
83
83
componentAPIs . children . fileSuffix ,
0 commit comments