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
name: Detox | |
on: [push] | |
jobs: | |
build: | |
runs-on: macOS-latest | |
timeout-minutes: 15 | |
env: |
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
/** | |
* Allows you to subscribe to whether or not the window is currently printing (user invoked the system print dialog). | |
* | |
* @returns Whether or not the document is currently printing. | |
*/ | |
export default function useIsPrinting(): boolean { | |
const [printing, setIsPrinting] = useState( | |
window.matchMedia('print').matches | |
); |
OlderNewer