/
githubmirror
/
hyper
Обзор
Документация
Войти
/
githubmirror
/
hyper
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
lib/components/style-sheet.tsx
27 строк
648 B
Labhansh Agrawal
sort imports
25 июл 2023, 21:46
25 июл 2023, 21:46
36ff6e9
Код
Авторство
О чём код?
import React, {forwardRef} from 'react'; import type {StyleSheetProps} from '../../typings/hyper'; const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => { const {borderColor} = props; return ( <style jsx global ref={ref}>{` ::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-thumb { -webkit-border-radius: 10px; border-radius: 10px; background: ${borderColor}; } ::-webkit-scrollbar-thumb:window-inactive { background: ${borderColor}; } `}</style> ); }); StyleSheet.displayName = 'StyleSheet'; export default StyleSheet;