Skip to content

Instantly share code, notes, and snippets.

View nadjitan's full-sized avatar
😃

Nadji Tan nadjitan

😃
View GitHub Profile
"use client";
import { type FC, useCallback, useEffect, useRef, useState } from "react";
import { css } from "@kuma-ui/core";
import { cva } from "class-variance-authority";
import { MdClose, MdOutlineUploadFile } from "react-icons/md";
import { isNullish } from "remeda";
import { SimpleButton } from "@/components/SimpleButton";
@nadjitan
nadjitan / modal.tsx
Last active June 21, 2023 06:36
Modal wrapper to handle show/hide state
import { useRef, useEffect } from "react"
interface ModalProps
extends Omit<
React.HTMLAttributes<HTMLDialogElement>,
"onMouseEnter" | "onMouseLeave"
> {
show: boolean
setShow: React.Dispatch<React.SetStateAction<boolean>>
}
@nadjitan
nadjitan / three.js
Last active December 18, 2022 01:02
Sample starter for threejs
import {
AmbientLight,
AnimationMixer,
Box3,
Clock,
DirectionalLight,
GridHelper,
Mesh,
Object3D,
PerspectiveCamera,