Scrollbar to respect dpr

This commit is contained in:
Philip Peterson 2025-06-15 17:04:26 -07:00
parent c4f05dbb1c
commit b19bc74001

View file

@ -1,14 +1,17 @@
import React, {forwardRef} from 'react';
import type {StyleSheetProps} from '../../typings/hyper';
import { useDevicePixelRatio } from 'use-device-pixel-ratio';
const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => {
const {borderColor} = props;
const dpr = useDevicePixelRatio();
return (
<style jsx global ref={ref}>{`
::-webkit-scrollbar {
width: 5px;
width: ${5 * dpr}px;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;