Skip to content

Instantly share code, notes, and snippets.

View MoonTahoe's full-sized avatar

Alex Banks MoonTahoe

View GitHub Profile
@MoonTahoe
MoonTahoe / color-organizer.css
Created October 15, 2017 03:40
The ui components and styles for the color organizer
html, body, div#react-container {
height: 100%;
min-height: 100%; }
h1 {
margin: 0;
padding: 0; }
body {
margin: 0;
import React, { Component } from 'react'
import storeFactory from './store'
import { loadLifts, changeLiftStatus } from './actions'
import './App.css'
const StatusCircle = ({status, selected=false, onSelect=f=>f}) =>
<div className={selected ? `${status} selected` : status} onClick={() => onSelect(status)}/>
const StatusIndicator = ({currentStatus, onStatusChange=f=>f}) =>
['open', 'hold', 'closed'].map(
@MoonTahoe
MoonTahoe / actions.js
Last active October 13, 2017 23:36
Exercise: Redux Color Organizer
import C from './constants'
import { v4 } from 'uuid'
export const addColor = (title, color) =>
({
type: C.ADD_COLOR,
id: v4(),
title,
color,
timestamp: new Date().toString()