mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-02 22:01:52 +00:00
More dark theme styles for visits page
This commit is contained in:
@@ -2,10 +2,14 @@ export const MAIN_COLOR = '#4696e5';
|
||||
|
||||
export const MAIN_COLOR_ALPHA = 'rgba(70, 150, 229, 0.4)';
|
||||
|
||||
export const HIGHLIGHTED_COLOR = '#F77F28';
|
||||
export const HIGHLIGHTED_COLOR = '#f77f28';
|
||||
|
||||
export const HIGHLIGHTED_COLOR_ALPHA = 'rgba(247, 127, 40, 0.4)';
|
||||
|
||||
export const PRIMARY_LIGHT_COLOR = 'white';
|
||||
|
||||
export const PRIMARY_DARK_COLOR = '#161b22';
|
||||
|
||||
export type Theme = 'dark' | 'light';
|
||||
|
||||
export const changeThemeInMarkup = (theme: Theme) => {
|
||||
@@ -13,3 +17,9 @@ export const changeThemeInMarkup = (theme: Theme) => {
|
||||
|
||||
html?.[0]?.setAttribute('data-theme', theme);
|
||||
};
|
||||
|
||||
export const isDarkThemeEnabled = (): boolean => {
|
||||
const html = document.getElementsByTagName('html');
|
||||
|
||||
return html?.[0]?.getAttribute('data-theme') === 'dark';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user