UNPKG

@aplus-frontend/ui

Version:

48 lines (47 loc) 1.14 kB
const o = (r) => ({ boxSizing: "border-box", margin: 0, padding: 0, color: r.textColor1, fontSize: r.fontSize, fontFamily: "inherit", lineHeight: r.lineHeight, listStyle: "none" }), e = (r) => ({ "::-webkit-scrollbar": { width: "10px", height: "10px" }, "::-webkit-scrollbar-thumb": { backgroundColor: r.scrollbarThumbColorBase, backgroundClip: "content-box", border: "1px solid transparent", borderRadius: "4px" }, "::-webkit-scrollbar-track, ::-webkit-scrollbar-corner": { backgroundColor: r.scrollbarTrackColorHover }, "::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active": { backgroundColor: r.scrollbarThumbColorHover } }), l = (r) => ({ ...o(r), display: "-webkit-inline-box", WebkitLineClamp: `${r.lineClamp || 2}`, WebkitBoxOrient: "vertical", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "normal", maxWidth: "100%", verticalAlign: "middle", wordBreak: "break-all", flex: 1 }), i = (r) => ({ ...l({ ...r, lineClamp: 1 }) }); export { l as multiRows, o as resetComponent, e as resetScrollbar, i as singleRow };