Skip to content

Commit

Permalink
Build template for react layout
Browse files Browse the repository at this point in the history
The individual components are defined in this commit. The Canvas and ShapeBar
components are positioned for the sake of getting the hang of CSS in JSX.
  • Loading branch information
carterjbastian committed Feb 28, 2017
1 parent e18906a commit 97a719b
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 1 deletion.
15 changes: 15 additions & 0 deletions app/components/Canvas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @flow
import React, { Component } from 'react';
var ReactDOM = require('react-dom');
var electron = require('electron');

// const {Raphael,Paper,Set,Circle,Ellipse,Image,Rect,Text,Path,Line} = require('react-raphael');

export default class Canvas extends Component {
render() {
return (
<div style={{position: 'absolute', backgroundColor: 'blue', width: '100%', height: '90%', margin: 0, padding: 0, top: '10%'}}>
<div></div>
</div>);
}
}
24 changes: 24 additions & 0 deletions app/components/Diagram.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// @flow
import React, { Component } from 'react';
var ReactDOM = require('react-dom');
var electron = require('electron');

// const {Raphael,Paper,Set,Circle,Ellipse,Image,Rect,Text,Path,Line} = require('react-raphael');

export default class App extends Component {
props: {
children: HTMLElement;
};

constructor(props) {
super(props);
};


render() {
return (
<div style={{position: 'absolute', backgroundColor: 'green', width: '100%', height: '100%', margin: 0, padding: 0}}>
<div></div>
</div>);
}
}
24 changes: 24 additions & 0 deletions app/components/DotGrid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// @flow
import React, { Component } from 'react';
var ReactDOM = require('react-dom');
var electron = require('electron');

// const {Raphael,Paper,Set,Circle,Ellipse,Image,Rect,Text,Path,Line} = require('react-raphael');

export default class App extends Component {
props: {
children: HTMLElement;
};

constructor(props) {
super(props);
};


render() {
return (
<div style={{position: 'absolute', backgroundColor: 'green', width: '100%', height: '100%', margin: 0, padding: 0}}>
<div></div>
</div>);
}
}
15 changes: 15 additions & 0 deletions app/components/ShapeBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @flow
import React, { Component } from 'react';
var ReactDOM = require('react-dom');
var electron = require('electron');

// const {Raphael,Paper,Set,Circle,Ellipse,Image,Rect,Text,Path,Line} = require('react-raphael');

export default class Canvas extends Component {
render() {
return (
<div style={{position: 'absolute', backgroundColor: 'red', width: '100%', height: '10%', margin: 0, padding: 0}}>
<div></div>
</div>);
}
}
5 changes: 4 additions & 1 deletion app/containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import React, { Component } from 'react';
var ReactDOM = require('react-dom');
var electron = require('electron');

import Canvas from '../components/Canvas';
import ShapeBar from '../components/ShapeBar';

// const {Raphael,Paper,Set,Circle,Ellipse,Image,Rect,Text,Path,Line} = require('react-raphael');

Expand All @@ -19,7 +21,8 @@ export default class App extends Component {
render() {
return (
<div style={{position: 'absolute', backgroundColor: 'green', width: '100%', height: '100%', margin: 0, padding: 0}}>
<div></div>
<ShapeBar />
<Canvas />
</div>);
}
}

0 comments on commit 97a719b

Please sign in to comment.