* feat: render footer as a component instead of render prop * Export FooterCenter as footer * remove useDevice export * revert some changes * remove * add spec * update specs * parse children into a dictionary * factor app footer components into a single file * Add docs * split app footer components Co-authored-by: dwelle <luzar.david@gmail.com>
20 lines
512 B
TypeScript
20 lines
512 B
TypeScript
import clsx from "clsx";
|
|
import { useExcalidrawAppState } from "../App";
|
|
|
|
const FooterCenter = ({ children }: { children?: React.ReactNode }) => {
|
|
const appState = useExcalidrawAppState();
|
|
return (
|
|
<div
|
|
className={clsx("layer-ui__wrapper__footer-center zen-mode-transition", {
|
|
"layer-ui__wrapper__footer-left--transition-bottom":
|
|
appState.zenModeEnabled,
|
|
})}
|
|
>
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default FooterCenter;
|
|
FooterCenter.displayName = "FooterCenter";
|