mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-06 19:25:17 +02:00
Added custom theme creator
This commit is contained in:
parent
378dd8e36d
commit
9ab6c65d85
10 changed files with 246 additions and 41 deletions
|
@ -9,11 +9,9 @@ interface ThemeState {
|
|||
userThemes: Theme[];
|
||||
}
|
||||
|
||||
const savedTheme: ThemeColors = parsePABToTheme(localStorage.theme) || {
|
||||
primary: '#effbff',
|
||||
accent: '#6ee2ff',
|
||||
background: '#242b33',
|
||||
};
|
||||
const savedTheme = localStorage.theme
|
||||
? parsePABToTheme(localStorage.theme)
|
||||
: parsePABToTheme('#effbff;#6ee2ff;#242b33');
|
||||
|
||||
const initialState: ThemeState = {
|
||||
activeTheme: {
|
||||
|
@ -55,6 +53,13 @@ export const themeReducer = (
|
|||
};
|
||||
}
|
||||
|
||||
case ActionType.addTheme: {
|
||||
return {
|
||||
...state,
|
||||
userThemes: [...state.userThemes, action.payload],
|
||||
};
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue