This file contains 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 { css } from 'styled-components' | |
/** | |
* For the specified media query, returns a tag function that can be used to | |
* automatically wrap the tagged template literal in its media query. | |
* | |
* @param {string} query The string or template literal containing the media | |
* query features. | |
*/ |
This file contains 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 { useEffect } from "react"; | |
/** | |
* This replaces the need for using window.addEventListener() when using react hooks. | |
* You use it in exactly the same way as window.addEventListener(). | |
* | |
* @example | |
* useEvent(event, listener, useCapture) | |
* | |
* @export |