woodpecker-test/stear/extra/Style/scrollBar1.js

25 lines
860 B
JavaScript
Raw Normal View History

2022-11-06 20:39:28 +01:00
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));
}