mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-12 03:17:03 +00:00
feat: create theme slice
This commit is contained in:
parent
9f4473bc22
commit
35e0fabc69
17
src/redux/theme/slice.ts
Normal file
17
src/redux/theme/slice.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { createSlice } from '@reduxjs/toolkit'
|
||||
|
||||
const initialState: 'light' | 'dark' = 'light'
|
||||
|
||||
const themeSlice = createSlice({
|
||||
name: 'theme',
|
||||
initialState,
|
||||
reducers: {
|
||||
setTheme: (_, action) => {
|
||||
return action.payload
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
export const { setTheme } = themeSlice.actions
|
||||
|
||||
export default themeSlice.reducer
|
Loading…
x
Reference in New Issue
Block a user