diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-07-28 12:02:41 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-07-28 12:02:41 +0200 |
commit | 395246903e3ce8aa6e7149365b9a1a37b1205f95 (patch) | |
tree | 6bb72dc424ba45683499a679ce45bc39d9fadba9 /components | |
parent | 4d2c9a4f7861ac2b61366bbde2284a24cb915d5c (diff) |
added pwa utility components
Diffstat (limited to 'components')
-rw-r--r-- | components/pwatools.tsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/components/pwatools.tsx b/components/pwatools.tsx new file mode 100644 index 0000000..c795281 --- /dev/null +++ b/components/pwatools.tsx @@ -0,0 +1,26 @@ +import Head from 'next/head'; + +export function NoScroll() { + return <Head> + <style + children=' + html, body { + position: fixed; + overflow: hidden; + width: 100vw; + height: 100vh; + } + ' + /> + </Head>; +} + +export function StatusBarOverscrollColor(props: { color?: string; }) { + var css = props.color || '#171d33'; + return <Head> + <meta name='apple-mobile-web-app-status-bar-style' content='black-translucent' /> + <meta name='theme-color' content={css} /> + <style children={` body { background-color: ${css} !important; } `} /> + <style children={` :root { background-color: ${css} !important; } `} /> + </Head>; +} |