init
This commit is contained in:
22
worklenz-frontend/src/features/actionSetup/buttonSlice.ts
Normal file
22
worklenz-frontend/src/features/actionSetup/buttonSlice.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
||||
|
||||
interface ButtonState {
|
||||
isButtonDisable: boolean;
|
||||
}
|
||||
|
||||
const initialState: ButtonState = {
|
||||
isButtonDisable: true,
|
||||
};
|
||||
|
||||
const buttonSlice = createSlice({
|
||||
name: 'button',
|
||||
initialState,
|
||||
reducers: {
|
||||
setButtonDisabled: (state, action: PayloadAction<boolean>) => {
|
||||
state.isButtonDisable = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setButtonDisabled } = buttonSlice.actions;
|
||||
export default buttonSlice.reducer;
|
||||
Reference in New Issue
Block a user