mirror of
https://github.com/bendtherules/ts-transformer-visualizer.git
synced 2026-08-18 13:51:48 +00:00
index - Export all components inside ASTVisualizer and connected redux actions
This commit is contained in:
+30
-14
@@ -3,26 +3,42 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
import { bindActionCreators } from "redux";
|
||||||
import { Provider } from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
|
|
||||||
|
import ASTOutline from "./components/ASTOutline";
|
||||||
|
import {
|
||||||
|
CodeOutputForInitial,
|
||||||
|
CodeOutputForCurrent
|
||||||
|
} from "./components/CodeOutput";
|
||||||
|
|
||||||
import configureStore from "./store";
|
import configureStore from "./store";
|
||||||
import { initSourceFile, updateSourceFile } from "./store/sourceFiles/actions";
|
import { initSourceFile, updateSourceFile } from "./store/sourceFiles/actions";
|
||||||
|
|
||||||
import styles from "./styles.css";
|
// import styles from "./styles.css";
|
||||||
|
|
||||||
export type Props = { text: string };
|
|
||||||
|
|
||||||
const store = configureStore();
|
const store = configureStore();
|
||||||
|
|
||||||
export class ExampleComponent extends React.Component<Props> {
|
export function ASTVisualizer() {
|
||||||
render() {
|
return (
|
||||||
const { text } = this.props;
|
<Provider store={store}>
|
||||||
|
Initial:
|
||||||
return (
|
<br />
|
||||||
<Provider store={store}>
|
<CodeOutputForInitial />
|
||||||
<div className={styles.test}>Example Component: {text}</div>
|
Current:
|
||||||
</Provider>
|
<br />
|
||||||
);
|
<CodeOutputForCurrent />
|
||||||
}
|
<ASTOutline />
|
||||||
|
</Provider>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { initSourceFile, updateSourceFile };
|
const {
|
||||||
|
initSourceFile: initSourceFileConnected,
|
||||||
|
updateSourceFile: updateSourceFileConnected
|
||||||
|
} = bindActionCreators({ initSourceFile, updateSourceFile }, store.dispatch);
|
||||||
|
|
||||||
|
export {
|
||||||
|
initSourceFileConnected as initSourceFile,
|
||||||
|
updateSourceFileConnected as updateSourceFile
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user