31 lines
740 B
TypeScript
31 lines
740 B
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
|
|
export default function Scrollbar() {
|
|
useEffect(() => {
|
|
const style = document.createElement("style");
|
|
style.innerHTML = `
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
::-webkit-scrollbar-track {
|
|
background: #060606;
|
|
}
|
|
::-webkit-scrollbar-thumb {
|
|
background: #2a2a2a;
|
|
border-radius: 20px;
|
|
}
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: #6c63ff;
|
|
box-shadow: 0 0 10px rgba(108, 99, 255, 0.5);
|
|
}
|
|
`;
|
|
document.head.appendChild(style);
|
|
return () => {
|
|
document.head.removeChild(style);
|
|
};
|
|
}, []);
|
|
|
|
return null; // Tento komponent nič nevykresľuje, iba pridáva štýly
|
|
} |