2020-08-13 04:35:31 -07:00
|
|
|
import React from "react";
|
|
|
|
import { ActionManager } from "../actions/manager";
|
|
|
|
import { AppState } from "../types";
|
|
|
|
|
|
|
|
export const BackgroundPickerAndDarkModeToggle = ({
|
|
|
|
appState,
|
|
|
|
setAppState,
|
|
|
|
actionManager,
|
2021-03-15 11:33:46 -07:00
|
|
|
showThemeBtn,
|
2020-08-13 04:35:31 -07:00
|
|
|
}: {
|
|
|
|
actionManager: ActionManager;
|
|
|
|
appState: AppState;
|
2020-10-16 11:53:40 +02:00
|
|
|
setAppState: React.Component<any, AppState>["setState"];
|
2021-03-15 11:33:46 -07:00
|
|
|
showThemeBtn: boolean;
|
2020-08-13 04:35:31 -07:00
|
|
|
}) => (
|
|
|
|
<div style={{ display: "flex" }}>
|
|
|
|
{actionManager.renderAction("changeViewBackgroundColor")}
|
2021-05-08 15:17:30 +05:30
|
|
|
{showThemeBtn && <>{actionManager.renderAction("toggleTheme")}</>}
|
2020-08-13 04:35:31 -07:00
|
|
|
</div>
|
|
|
|
);
|