feat: render footer as a component instead of render prop

This commit is contained in:
Aakansha Doshi 2022-07-13 12:12:20 +05:30
parent a7153d9d1d
commit 67bc10f33b
7 changed files with 107 additions and 99 deletions

View file

@ -474,12 +474,8 @@ class App extends React.Component<AppProps, AppState> {
this.scene.getNonDeletedElements(),
this.state,
);
const {
onCollabButtonClick,
renderTopRightUI,
renderFooter,
renderCustomStats,
} = this.props;
const { onCollabButtonClick, renderTopRightUI, renderCustomStats } =
this.props;
return (
<div
@ -520,7 +516,6 @@ class App extends React.Component<AppProps, AppState> {
langCode={getLanguage().code}
isCollaborating={this.props.isCollaborating}
renderTopRightUI={renderTopRightUI}
renderCustomFooter={renderFooter}
renderCustomStats={renderCustomStats}
viewModeEnabled={viewModeEnabled}
showExitZenModeBtn={
@ -537,7 +532,9 @@ class App extends React.Component<AppProps, AppState> {
library={this.library}
id={this.id}
onImageAction={this.onImageAction}
/>
>
{this.props.children}
</LayerUI>
<div className="excalidraw-textEditorContainer" />
<div className="excalidraw-contextMenuContainer" />
{selectedElement.length === 1 && this.state.showHyperlinkPopup && (