useAppTheme.ts 487 B

12345678910111213141516
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. // TODO add light color, if we have light theme
  3. // TODO toggle color, if we have light theme
  4. export const useAppTheme = () => {
  5. const meta =
  6. document.head.querySelector('meta[name="theme-color"]') ||
  7. document.createElement('meta')
  8. meta.setAttribute('name', 'theme-color')
  9. meta.setAttribute('content', '#191919')
  10. if (!document.head.contains(meta)) {
  11. document.head.appendChild(meta)
  12. }
  13. }