This file contains hidden or 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
/* eslint-env browser */ | |
import {useRef} from 'react'; | |
export const useFrame = <T = any>(fn: (...args: T[]) => any) => { | |
const frameRef = useRef(); | |
return (..._args: T[]) => { | |
frameRef.current && cancelAnimationFrame(frameRef.current); | |
frameRef.current = requestAnimationFrame(() => fn(..._args)); |
This file contains hidden or 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 plugin = require("tailwindcss/plugin"); | |
// tested for tailwindcss 2.1.2 | |
module.exports = { | |
// other config | |
variants: { | |
extend: { | |
// other variant extensions | |
display: ["empty"], |
OlderNewer