-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(sanity): rename
ToolMenu
to StudioToolMenu
, update API a…
…nd add test id:s
- Loading branch information
1 parent
801d336
commit 501a56d
Showing
3 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
packages/sanity/src/studio/components/navbar/tools/StudioToolMenu.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
import {ToolMenuProps} from '../../../../config' | ||
import {ToolCollapseMenu} from './ToolCollapseMenu' | ||
import {ToolVerticalMenu} from './ToolVerticalMenu' | ||
|
||
export function StudioToolMenu(props: ToolMenuProps) { | ||
const {context, isSidebarOpen, ...restProps} = props | ||
|
||
if (context === 'sidebar') { | ||
return <ToolVerticalMenu isVisible={isSidebarOpen} {...restProps} /> | ||
} | ||
|
||
return <ToolCollapseMenu {...restProps} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
packages/sanity/src/studio/components/navbar/tools/ToolMenu.tsx
This file was deleted.
Oops, something went wrong.