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
import { useCallback, useEffect, useRef } from 'react'; | |
type UseTimeoutCallback = (...args: Array<any>) => void; | |
/** | |
* Set a timer, which executes a function once the timer expires. Exposes pause, resume and cancel | |
* callbacks to the consumers. | |
* | |
* @param {UseTimeoutCallback} fn Callback function to execute after the specified timeout | |
* @param {number} ms Timeout in milliseconds after which to execute the callback |
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
.rounded-corners-gradient-borders { | |
width: 300px; | |
height: 80px; | |
border: double 4px transparent; | |
border-radius: 80px; | |
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff); | |
background-origin: border-box; | |
background-clip: padding-box, border-box; | |
} |