zammad/app/frontend/shared/initializer/initializeAlertClasses.ts

20 lines
608 B
TypeScript
Raw Permalink Normal View History

// Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
2023-12-14 16:16:58 +00:00
import type { AlertClassMap } from '#shared/components/CommonAlert/types.ts'
// Provide your own map with the following keys, the values given here are just examples.
let alertClasses: AlertClassMap = {
base: 'common-alert',
danger: 'common-alert-danger',
info: 'common-alert-info',
success: 'common-alert-success',
warning: 'common-alert-warning',
dismissButton: '',
2023-12-14 16:16:58 +00:00
}
export const initializeAlertClasses = (classes: AlertClassMap) => {
alertClasses = classes
}
export const getAlertClasses = () => alertClasses