Skip to content

Commit 4af70fe

Browse files
authored
Merge pull request #282 from rvsia/fixComponentExamples
ComponentExample cleanup
2 parents 2e0ca1b + 2e543be commit 4af70fe

File tree

17 files changed

+123
-64
lines changed

17 files changed

+123
-64
lines changed

packages/react-renderer-demo/src/app/pages/_app.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ export default class MyApp extends App {
1919
}
2020
}
2121

22+
static async getInitialProps ({ Component, router, ctx }) {
23+
let page = {};
24+
if (Component.getInitialProps) {
25+
page = await Component.getInitialProps(ctx);
26+
}
27+
28+
return { page };
29+
}
30+
2231
render() {
2332
const { Component, pageProps } = this.props;
2433

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Checkbox multiple
44

5-
<ComponentExample component="checkbox-multiple" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Checkbox
44

5-
<ComponentExample component="checkbox" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Date picker
44

5-
<ComponentExample component="date-picker" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Plain text
44

5-
<ComponentExample component="plain-text" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Radio
44

5-
<ComponentExample component="radio" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Select
44

5-
<ComponentExample component="select-field" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Subform
44

5-
<ComponentExample component="sub-form" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Switch
44

5-
<ComponentExample component="switch-field" />
5+
<ComponentText />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ComponentExample from '../../src/components/component-example';
1+
import ComponentText from '@docs/components/component-example-text';
22

33
# Tabs
44

5-
<ComponentExample component="tabs" />
5+
<ComponentText />

0 commit comments

Comments
 (0)