World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#2814][#2688] improve(web): add configuration file to manage common user interface variables (#2778)
CHEYNE9a883a9ed76f
diff --git a/web/src/components/StyledToast.js b/web/src/components/StyledToast.jsindex 0d1b50a221..2904c80e1b 100644--- a/web/src/components/StyledToast.js+++ b/web/src/components/StyledToast.js@@ -6,15 +6,18 @@'use client'import { toast, ToastBar, Toaster } from 'react-hot-toast'+import themeConfig from '../configs/themeConfig'export default function StyledToast() {+ const { toastPosition, toastDuration } = themeConfig+return (<div><ToasterreverseOrder={false}- position='top-right'+ position={toastPosition}toastOptions={{- duration: Infinity,+ duration: toastDuration,style: {borderRadius: '8px',maxWidth: 500diff --git a/web/src/configs/themeConfig.js b/web/src/configs/themeConfig.jsnew file mode 100644index 0000000000..32f13646cc--- /dev/null+++ b/web/src/configs/themeConfig.js@@ -0,0 +1,26 @@+/*+ * Copyright 2024 Datastrato Pvt Ltd.+ * This software is licensed under the Apache License version 2.+ */++// @ts-check++/**+ * @typedef {import('react-hot-toast').ToastPosition} ToastPosition+ */++const themeConfig = {+ /**+ * @description message box position+ * @type {ToastPosition}+ */+ toastPosition: 'top-right',++ /**+ * @description message box duration in milliseconds+ * @type {number}+ */+ toastDuration: 4000+}++export default themeConfig