styles - Add basic styling to show AST and code diff

This commit is contained in:
2020-01-27 18:21:45 +05:30
parent ff9a14d171
commit 15a7f3e7cb
4 changed files with 67 additions and 15 deletions
+27 -8
View File
@@ -1,10 +1,7 @@
/**
* @class ExampleComponent
*/
import * as React from "react";
import { bindActionCreators } from "redux";
import { Provider } from "react-redux";
import { Grid, Row, Col } from "react-flexbox-grid";
import ASTOutline from "./components/ASTOutline";
import CodeOutputDiff from "./components/CodeOutput";
@@ -12,16 +9,38 @@ import CodeOutputDiff from "./components/CodeOutput";
import configureStore from "./store";
import { initSourceFile, updateSourceFile } from "./store/sourceFiles/actions";
// import styles from "./styles.css";
import styles from "./styles.css";
const store = configureStore();
export function ASTVisualizer() {
return (
<Provider store={store}>
Initial vs Current:
<CodeOutputDiff />
<ASTOutline />
<Grid fluid className={styles.wrapperWhole}>
<Row>
<Col xs={12}>
<h1 className={styles.title}>AST Transformation visualizer</h1>
</Col>
</Row>
<Row>
<Col xs={12} md={6} className={styles.hideOverflow}>
<Row>
<h2 className={styles.titleLight}>AST Inline Diff</h2>
</Row>
<ASTOutline />
</Col>
<Col xs={12} md={6}>
<Row>
<h2 className={styles.titleLight}>Code output Diff</h2>
</Row>
<Row>
<Col xs={6} className={styles.titleLight}>Input</Col>
<Col xs={6} className={styles.titleLight}>Output</Col>
</Row>
<CodeOutputDiff />
</Col>
</Row>
</Grid>
</Provider>
);
}
+18 -6
View File
@@ -1,8 +1,20 @@
/* add css styles here (optional) */
.wrapperWhole {
margin: 1em;
}
.test {
display: inline-block;
margin: 2em auto;
border: 2px solid #000;
font-size: 2em;
.title {
margin: 8px 0;
padding-bottom: 8px;
text-align: center;
}
.titleLight {
background-color: lightgray;
padding: 4px 8px;
margin-bottom: 4px;
border-bottom: 2px solid darkgray;
}
.hideOverflow {
overflow: hidden;
}