Skip to content

Instantly share code, notes, and snippets.

View StevenCreates's full-sized avatar
The world is abundant.

Steven Hofheins StevenCreates

The world is abundant.
View GitHub Profile
@StevenCreates
StevenCreates / Toggle.jsx
Last active May 26, 2022 22:38
Toggle Solution
import { useState } from 'react';
import {
motion,
} from "framer-motion";
import styled from 'styled-components';
const ToggleContainer = styled(motion.div)`
position: fixed;
top: 0;
import { FC, useEffect } from "react";
interface HouseItems {
Rooms: {
master: {
masterBath: boolean | null,
}
}
}
import { useEffect, useState } from "react";
import {
motion,
useViewportScroll,
useSpring,
useTransform,
} from "framer-motion";
import styled from 'styled-components';
import { useEffect, useState } from "react";
import {
motion,
useViewportScroll,
useSpring,
useTransform,
AnimatePresence
} from "framer-motion";
import styled from 'styled-components';
import { Span } from "./Span";
import { useState } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import styled from 'styled-components';
import useCountdown from "@bradgarropy/use-countdown"
import Confetti from "react-confetti";
const CountDownContainer = styled(motion.div)`
position: fixed;
top: 0;
right: 0;
import { useState } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import styled from 'styled-components';
import useCountdown from "@bradgarropy/use-countdown"
import Confetti from "react-confetti";
const CountDownContainer = styled(motion.div)`
position: fixed;
top: 0;
right: 0;
import { useState } from 'react';
import { motion } from 'framer-motion';
import styled from 'styled-components';
const Loader = styled(motion.div)`
position: fixed;
top: 0;
right: 0;
left: 0;
@StevenCreates
StevenCreates / LoaderExample.js
Last active March 26, 2022 08:21
Framer Motion Starter Files For Spinning Loader
import { motion } from 'framer-motion';
import styled from 'styled-components';
const Loader = styled(motion.div)`
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
import { useState, useEffect, ReactElement } from 'react';
function App(): ReactElement {
const [password, setPassword] = useState({
firstPassword: '',
secondPassword: ''
})
const [validLength, setValidLength] = useState(false);
const [hasNumber, setHasNumber] = useState(false);
const inputChange: (event: React.ChangeEvent<HTMLInputElement>) => void = (event) => {
const { value, name } = event.target;
setPassword({
...password,
[name]: value
})
}