ISSUE-032 - Found a fix to the Hooks rendering error by using ReactRouter.
This commit is contained in:
1 parent
e676c7a95a
commit
f9f7b739ee
8 files changed
+38
-42
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { Grid } from "@bedrock-layout/grid";
|
||||
import { PadBox } from "@bedrock-layout/padbox";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
import { workspaceSelector } from "../../../features/workspace/workspaceSelector";
|
||||
import { setAnimatedBG } from "../../../features/workspace/workspaceSlice";
|
||||
|
||||
import { Toggle } from "../../Common/Inputs/Toggle";
|
||||
import { OverlayControl } from "../../OverlayTool";
|
||||
|
||||
export const WorkspaceControls = () => {
|
||||
const dispatch = useDispatch();
|
||||
const { animatedBG } = useSelector(workspaceSelector);
|
||||
|
||||
return(
|
||||
<Grid gutter="sm" minItemWidth="100px">
|
||||
<PadBox padding="sm">
|
||||
<Toggle
|
||||
label="Animate BG"
|
||||
toggled={animatedBG}
|
||||
onToggle={(value: boolean) => {
|
||||
dispatch(setAnimatedBG(value));
|
||||
}} />
|
||||
</PadBox>
|
||||
<OverlayControl />
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./WorkspaceControls";
|
||||
Reference in new issue
Block a user