excalidraw/src/components/BackgroundPickerAndDarkModeToggle.tsx

21 lines
561 B
TypeScript
Raw Normal View History

import React from "react";
import { ActionManager } from "../actions/manager";
import { AppState } from "../types";
export const BackgroundPickerAndDarkModeToggle = ({
appState,
setAppState,
actionManager,
showThemeBtn,
}: {
actionManager: ActionManager;
appState: AppState;
2020-10-16 11:53:40 +02:00
setAppState: React.Component<any, AppState>["setState"];
showThemeBtn: boolean;
}) => (
<div style={{ display: "flex" }}>
{actionManager.renderAction("changeViewBackgroundColor")}
{showThemeBtn && <>{actionManager.renderAction("toggleTheme")}</>}
</div>
);