This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<Button | |
width='130px' | |
color='#000' | |
> | |
SUBMIT | |
</Button> | |
</Flex> | |
// map over array & display text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => { | |
const [todos, setTodos] = useState([]); | |
const addTodo = (e) => { | |
// add todo to the todos array here | |
} | |
return ( | |
<Flex | |
backgroundColor='#282c34' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => { | |
return ( | |
<Flex | |
backgroundColor='#282c34' | |
height='100vh' | |
alignItems='center' | |
pt='2rem' | |
flexDirection='column' | |
> | |
<Heading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => { | |
return ( | |
<Flex | |
backgroundColor='#282c34' | |
height='100vh' | |
alignItems='center' | |
pt='2rem' | |
flexDirection='column' | |
> | |
<Heading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import { | |
Heading, | |
Text, | |
Flex, | |
Box, | |
Button | |
} from 'rebass'; | |
import { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const App = () => { | |
return ( | |
<div> | |
todos | |
</div> | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global.THREE = require("three"); | |
require("three/examples/js/controls/OrbitControls"); | |
const canvasSketch = require("canvas-sketch"); | |
const settings = { | |
animate: true, | |
context: "webgl", | |
scaleToView: true | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
// 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 |