mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
* feat: rewrite public UI component rendering using tunnels * factor out into components * comments * fix variable naming * fix not hiding welcomeScreen * factor out AppFooter and memoize components * remove `UIOptions.welcomeScreen` and render only from host app * factor out tunnels into own file * update changelog. Keep `UIOptions.welcomeScreen` as deprecated * update changelog * lint --------- Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
23 lines
645 B
TypeScript
23 lines
645 B
TypeScript
import clsx from "clsx";
|
|
import { useExcalidrawAppState } from "../App";
|
|
import { footerCenterTunnel } from "../tunnels";
|
|
import "./FooterCenter.scss";
|
|
|
|
const FooterCenter = ({ children }: { children?: React.ReactNode }) => {
|
|
const appState = useExcalidrawAppState();
|
|
return (
|
|
<footerCenterTunnel.In>
|
|
<div
|
|
className={clsx("footer-center zen-mode-transition", {
|
|
"layer-ui__wrapper__footer-left--transition-bottom":
|
|
appState.zenModeEnabled,
|
|
})}
|
|
>
|
|
{children}
|
|
</div>
|
|
</footerCenterTunnel.In>
|
|
);
|
|
};
|
|
|
|
export default FooterCenter;
|
|
FooterCenter.displayName = "FooterCenter";
|