diff options
| author | Adam Soltys <[email protected]> | 2022-09-26 23:56:19 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-26 23:56:49 -0700 |
| commit | 66a6935a7050be9490780102bd80205f7c1ff6c3 (patch) | |
| tree | 30102e141a37d75dbe60e5ee1d7ecbb1e4165b1d /src/lib | |
| parent | bc8e1f7a365b16b7d5fe5a77fcc0754b13a40d0c (diff) | |
| download | coinos-ui-66a6935a7050be9490780102bd80205f7c1ff6c3.tar.gz coinos-ui-66a6935a7050be9490780102bd80205f7c1ff6c3.zip | |
tip refactoring
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index 80419a45..7c05e7c3 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -137,3 +137,8 @@ export const f = (s, currency) => .replace('CA', ''); export const s = (s) => new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(s); + +export const toggleFullscreen = (el) => + document.fullscreenElement + ? document.exitFullscreen() + : el.requestFullscreen().catch(console.log); |
