diff options
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>; +} |