Skip to content

Instantly share code, notes, and snippets.

View Robert-W's full-sized avatar

Robert Winterbottom Robert-W

View GitHub Profile
@Robert-W
Robert-W / basic.css
Last active August 15, 2016 03:09
D3 4.0 Bar Chart
.chart {
position: relative;
}
.tooltip {
position: absolute;
background: blue;
color: white;
padding: 5px;
top: 20px;
@Robert-W
Robert-W / MuiClick.js
Last active April 29, 2016 13:28
Material UI Click Wrapper Component
import ReactDOM from 'react-dom';
import React from 'react';
let timeoutDuration = 1500,
timer;
//- Base Styles
let buttonStyles = {
display: 'inline-block',
position: 'relative',
@Robert-W
Robert-W / ContextExample.js
Created February 4, 2016 13:30
Example of Using context in React with ES6 Classes to pass a reference to a map object around
import appActions from 'actions/AppActions';
import React, {Component, PropTypes} from 'react';
import {mapConfig} from 'js/config';
import EsriMap from 'esri/map';
class Map extends Component {
//- Define your context types here as static property
static childContextTypes = {
map: PropTypes.object
};