mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: render footer as a component instead of render prop (#5970)
* 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>
This commit is contained in:
parent
d2e371cdf0
commit
b704705ed8
17 changed files with 232 additions and 160 deletions
|
@ -534,12 +534,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
|
||||
|
@ -583,7 +579,6 @@ class App extends React.Component<AppProps, AppState> {
|
|||
langCode={getLanguage().code}
|
||||
isCollaborating={this.props.isCollaborating}
|
||||
renderTopRightUI={renderTopRightUI}
|
||||
renderCustomFooter={renderFooter}
|
||||
renderCustomStats={renderCustomStats}
|
||||
renderCustomSidebar={this.props.renderSidebar}
|
||||
showExitZenModeBtn={
|
||||
|
@ -601,7 +596,9 @@ class App extends React.Component<AppProps, AppState> {
|
|||
this.state.activeTool.type === "selection" &&
|
||||
!this.scene.getElementsIncludingDeleted().length
|
||||
}
|
||||
/>
|
||||
>
|
||||
{this.props.children}
|
||||
</LayerUI>
|
||||
<div className="excalidraw-textEditorContainer" />
|
||||
<div className="excalidraw-contextMenuContainer" />
|
||||
{selectedElement.length === 1 &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue