Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle committed Sep 11, 2024
1 parent fe39bc4 commit 1f4397a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/excalidraw/components/DefaultSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ const DefaultSidebarTrigger = withInternalFallback(
);
DefaultSidebarTrigger.displayName = "DefaultSidebarTrigger";

const DefaultTabTriggers = ({
children,
...rest
}: { children: React.ReactNode } & React.HTMLAttributes<HTMLDivElement>) => {
const DefaultTabTriggers = ({ children }: { children: React.ReactNode }) => {
const { DefaultSidebarTabTriggersTunnel } = useTunnels();
return (
<DefaultSidebarTabTriggersTunnel.In>
<Sidebar.TabTriggers {...rest}>{children}</Sidebar.TabTriggers>
{children}
</DefaultSidebarTabTriggersTunnel.In>
);
};
Expand Down Expand Up @@ -76,7 +73,8 @@ export const DefaultSidebar = Object.assign(
return (
<Sidebar
{...rest}
name={"default"}
name="default"
key="default"
className={clsx("default-sidebar", className)}
docked={
isForceDocked || (docked ?? appState.defaultSidebarDockedPreference)
Expand All @@ -94,15 +92,15 @@ export const DefaultSidebar = Object.assign(
>
<Sidebar.Tabs>
<Sidebar.Header>
<DefaultSidebar.TabTriggers>
<Sidebar.TabTriggers>
<Sidebar.TabTrigger tab={CANVAS_SEARCH_TAB}>
{searchIcon}
</Sidebar.TabTrigger>
<Sidebar.TabTrigger tab={LIBRARY_SIDEBAR_TAB}>
{LibraryIcon}
</Sidebar.TabTrigger>
</DefaultSidebar.TabTriggers>
{rest.__fallback && <DefaultSidebarTabTriggersTunnel.Out />}
<DefaultSidebarTabTriggersTunnel.Out />
</Sidebar.TabTriggers>
</Sidebar.Header>
<Sidebar.Tab tab={LIBRARY_SIDEBAR_TAB}>
<LibraryMenu />
Expand Down

0 comments on commit 1f4397a

Please sign in to comment.