25 lines
No EOL
860 B
JavaScript
25 lines
No EOL
860 B
JavaScript
import { Stear } from "../../main.js";
|
|
|
|
export const scrollBarCss1 = ({ size = "5px", background = "transparent", thumbColor = "#33a", hoverColor ="#44f"}) => {
|
|
return {
|
|
"::-webkit-scrollbar":{
|
|
width: size,
|
|
height: size,
|
|
},
|
|
"::-webkit-scrollbar-track":{
|
|
background: background,
|
|
|
|
},
|
|
"::-webkit-scrollbar-thumb":{
|
|
background: thumbColor,
|
|
borderRadius: `calc(${size} / 2)`,
|
|
},
|
|
"::-webkit-scrollbar-thumb:hover":{
|
|
background: hoverColor
|
|
}
|
|
}
|
|
};
|
|
|
|
export const applyScrollBarCss1 = ({ size = "5px", background = "transparent", thumbColor = "#33a", hoverColor = "#44f" } = {}) => {
|
|
Object.entries(scrollBarCss1({ size, background, thumbColor, hoverColor })).forEach(([k,d])=>Stear.addGlobalStyleJSON(d,k));
|
|
} |