Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ascoders committed Mar 7, 2019
1 parent 81cb1b2 commit 54f2ccb
Showing 1 changed file with 15 additions and 25 deletions.
40 changes: 15 additions & 25 deletions docs/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
import GaeaComponents from 'gaea-basic-components';
import * as React from 'react';
import Component from '../src/index';

class Props {}

class State {}

class TestComponent extends React.PureComponent {
public static defaultProps = {
editSetting: {
key: 'aaaa',
name: '66666',
isContainer: false
}
};
public render() {
return <div>123</div>;
}
}

export default class Page extends React.PureComponent<Props, State> {
public static defaultProps = new Props();
public state = new State();

public render() {
return (
<Component
// disableBuiltInPlugin={['preview']}
// preComponents={[
// {
// gaeaKey: 'gaea-button',
// components: [
// {
// name: 'gaea-button1',
// props: { text: '123' }
// },
// {
// name: 'gaea-button2',
// props: { text: '456' }
// }
// ]
// }
// ]}
onSave={data => {
// tslint:disable-next-line:no-console
console.log(JSON.stringify(data, null, 2));
}}
locale="en"
/>
);
return <Component componentClasses={[TestComponent, ...GaeaComponents]} />;
}
}

0 comments on commit 54f2ccb

Please sign in to comment.