Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 19x 19x | import { ComponentProps, PropsWithChildren, ReactElement } from "react";
import SimpleBar from "simplebar-react";
import "simplebar-react/dist/simplebar.min.css";
export default function ScrollBar({
children,
...props
}: Readonly<
PropsWithChildren<ComponentProps<typeof SimpleBar>>
>): ReactElement {
return (
<SimpleBar {...props}>
{children}
<style global jsx>{`
.simplebar-track.simplebar-vertical {
width: 14px;
}
.simplebar-scrollbar {
background-color: transparent;
transition: background-color 0.2s;
}
.simplebar-scrollbar.simplebar-hover {
background-color: transparent;
}
.simplebar-scrollbar:before {
background-color: #f6f6f6cd;
border-radius: 0;
width: 12px;
}
.simplebar-scrollbar.simplebar-hover:before {
background-color: #ffffffde;
border-radius: 0;
width: 12px;
}
`}</style>
</SimpleBar>
);
}
|