Skip to content

Instantly share code, notes, and snippets.

View divyanshusahu's full-sized avatar
💬
Divyanshu is typing

Divyanshu Sahu divyanshusahu

💬
Divyanshu is typing
View GitHub Profile
@divyanshusahu
divyanshusahu / editor.js
Last active December 12, 2019 14:48
My Code for making an editor using draftjs and some material-ui components.
import {
Editor,
EditorState,
RichUtils,
AtomicBlockUtils,
CompositeDecorator
} from "draft-js";
import Button from "@material-ui/core/Button";
import Icon from "@material-ui/core/Icon";
@divyanshusahu
divyanshusahu / Heading.js
Created April 4, 2020 17:06
Border animation (react component)
import { motion } from "framer-motion";
function HeroHeading(props) {
let heading_text = props.heading_text;
const variants = {
initial: { y: 30, opacity: 0 },
enter: { y: 0, opacity: 1, transition: { duration: 0.25 } }
};
let character_array = heading_text.split("");
const framer_spans = character_array.map((c, i) => (