2023-07-23 11:21:04 -08:00
|
|
|
import React, {forwardRef} from 'react';
|
2023-07-25 09:30:19 -08:00
|
|
|
|
2023-07-25 01:39:51 -08:00
|
|
|
import type {StyleSheetProps} from '../../typings/hyper';
|
2017-06-11 02:42:39 -08:00
|
|
|
|
2023-07-24 23:01:01 -08:00
|
|
|
const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => {
|
2023-07-15 20:20:55 -08:00
|
|
|
const {borderColor} = props;
|
2017-06-11 02:42:39 -08:00
|
|
|
|
2023-07-15 20:20:55 -08:00
|
|
|
return (
|
2023-07-23 11:21:04 -08:00
|
|
|
<style jsx global ref={ref}>{`
|
2023-07-15 20:20:55 -08:00
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
width: 5px;
|
|
|
|
|
}
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
|
-webkit-border-radius: 10px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
background: ${borderColor};
|
|
|
|
|
}
|
|
|
|
|
::-webkit-scrollbar-thumb:window-inactive {
|
|
|
|
|
background: ${borderColor};
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
);
|
2023-07-23 11:21:04 -08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
StyleSheet.displayName = 'StyleSheet';
|
2023-07-15 20:20:55 -08:00
|
|
|
|
|
|
|
|
export default StyleSheet;
|