Files
DAV/lib/overlayHandler.js
Do-raa e24b3e1955
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
add interactions to comments
2024-12-23 15:44:36 +01:00

22 lines
696 B
JavaScript

/**
* Display overlay with dynamic parameters.
* @param {Object} options - Overlay configuration.
* @param {string} options.icon - Icon to display in the overlay.
* @param {string} options.message - Message to display in the overlay.
* @param {string} options.buttonText - Button text to display in the overlay.
* @param {string} options.iconColor - Icon color to display in the overlay.
* @param {Ref<boolean>} overlay - Reactive overlay state.
*/
export const showOverlay = (options, overlay) => {
const { icon, message, buttonText, iconColor } = options;
overlay.value = {
icon,
message,
buttonText,
iconColor,
visible: true,
};
};