UNPKG

@aplus-frontend/ui

Version:

23 lines (22 loc) 923 B
import { computed as a } from "vue"; import { getHexWithOpacity as m } from "../utils/getFileInfo.mjs"; import "../../config-provider/index.mjs"; import { useNamespace as d } from "../../config-provider/hooks/use-namespace.mjs"; import { useGlobalConfig as c } from "../../config-provider/hooks/use-global-config.mjs"; function y(o, p, t) { const { b: n, bm: e } = d("ap-download"), i = c("uiMode"), l = a(() => ({ "--download-main-color": o.value, "--download-main-color-opacity": m(o.value, 0.6) })), s = a(() => [n("wrapper"), e("wrapper", p.value)].filter(Boolean)), u = a(() => { const r = [n("inner-wrapper"), e("inner-wrapper", p.value)]; return t.value && (i.value === "aplus" ? r.push(e("inner-wrapper", "disabled")) : r.push(e("inner-wrapper", "disabled-admin"))), r; }); return { wrapperStyle: l, getWrapperClass: s, getInnerWrapperClass: u }; } export { y as useStyle };