Skip to content

Instantly share code, notes, and snippets.

View marshallmurphy's full-sized avatar

Tyler Marshal Murphy marshallmurphy

  • Apply Digital
  • Calgary, Alberta
View GitHub Profile
...
<Button
width='130px'
color='#000'
>
SUBMIT
</Button>
</Flex>
// map over array & display text
const App = () => {
const [todos, setTodos] = useState([]);
const addTodo = (e) => {
e.preventDefault();
if (e.target[0].value.length > 0) {
const todo = e.target[0].value;
const newTodos = [...todos];
newTodos.unshift(todo);
setTodos(newTodos);
const App = () => {
const [todos, setTodos] = useState([]);
const addTodo = (e) => {
// add todo to the todos array here
}
return (
<Flex
backgroundColor='#282c34'
const App = () => {
return (
<Flex
backgroundColor='#282c34'
height='100vh'
alignItems='center'
pt='2rem'
flexDirection='column'
>
<Heading
const App = () => {
return (
<Flex
backgroundColor='#282c34'
height='100vh'
alignItems='center'
pt='2rem'
flexDirection='column'
>
<Heading
import React, { useState } from 'react';
import {
Heading,
Text,
Flex,
Box,
Button
} from 'rebass';
import {
import React from 'react';
const App = () => {
return (
<div>
todos
</div>
);
}
@keyframes rubberBand {
from {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
30% {
-webkit-transform: scale3d(1.25, 0.75, 1);
transform: scale3d(1.25, 0.75, 1);
}
global.THREE = require("three");
require("three/examples/js/controls/OrbitControls");
const canvasSketch = require("canvas-sketch");
const settings = {
animate: true,
context: "webgl",
scaleToView: true
};
//...
// LIGHTING
const light = new THREE.PointLight("white", 1.25);
light.position.set(0, 0, 0);
scene.add(light);
// illuminate the sun
createSpotlights(scene); // call the function and pass in our scene
// HELPERS