-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add studioActiveToolLayout and navbar rightSectionNode pr…
…op (#5749) * feat(core): add StudioActiveToolLayout api * feat(core): add studioNavbar __internal_rightSectionNode prop
- Loading branch information
1 parent
b6199a1
commit c708671
Showing
6 changed files
with
69 additions
and
14 deletions.
There are no files selected for viewing
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
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
12 changes: 12 additions & 0 deletions
12
packages/sanity/src/core/studio/components/navbar/StudioActiveToolLayout.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,12 @@ | ||
import {createElement} from 'react' | ||
|
||
import {type Tool} from '../../../config' | ||
|
||
interface StudioActiveToolLayoutProps { | ||
activeTool: Tool | ||
} | ||
|
||
export function StudioActiveToolLayout(props: StudioActiveToolLayoutProps) { | ||
const {activeTool} = props | ||
return createElement(activeTool.component, {tool: activeTool}) | ||
} |
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
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
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