dk-plus
Version:
27 lines (26 loc) • 947 B
JavaScript
import { toRaw as n } from "vue";
import { getColor as i } from "../public/get-color/index.js";
import { getStyleList as L } from "../public/get-StyleList/index.js";
import { setSize as t } from "../public/set-size/index.js";
import "../../_icon/index.js";
const S = (b) => {
const r = { ...n(b) }, { classes: s } = L(r, "scrollbar"), d = s([...[]], "dk-scrollbar"), h = () => {
const { width: o, height: l, barWidth: a, trackColor: c, thumbColor: p, thumbRadius: e } = r, u = p || "#c1c1c1";
return {
"--scrollbar-width": o && t(o),
"--scrollbar-height": l && t(l),
"--scrollbar-bar-width": a && t(a),
"--scrollbar-track-color": c && i(c).getDodge(0),
"--scrollbar-thumb-radius": e && t(e),
"--scrollbar-thumb-color": i(u).hexToRgba(0)
};
}, m = s([...[]], "dk-scrollbar-wrapper");
return {
classList: d,
styleList: h(),
wrapperClassList: m
};
};
export {
S as getDkScroll
};