use-menu-css-var.mjs 645 B

1234567891011121314151617181920
  1. import { computed } from 'vue';
  2. import useMenuColor from './use-menu-color.mjs';
  3. import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
  4. const useMenuCssVar = (props, level) => {
  5. const ns = useNamespace("menu");
  6. return computed(() => {
  7. return ns.cssVarBlock({
  8. "text-color": props.textColor || "",
  9. "hover-text-color": props.textColor || "",
  10. "bg-color": props.backgroundColor || "",
  11. "hover-bg-color": useMenuColor(props).value || "",
  12. "active-color": props.activeTextColor || "",
  13. level: `${level}`
  14. });
  15. });
  16. };
  17. export { useMenuCssVar };
  18. //# sourceMappingURL=use-menu-css-var.mjs.map