Skip to content

Commit 0ecc75c

Browse files
Merge pull request #188 from Project-insert-name/studio->root
Lenke fra Studio til Root
2 parents 7c9bd7c + cc6f4b5 commit 0ecc75c

3 files changed

Lines changed: 8648 additions & 7808 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"use client"
2+
3+
import { type ToolMenuProps } from "sanity"
4+
import { defaultIconSize } from "@/components/icons/icon"
5+
import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"
6+
7+
/**
8+
* En custom toolmenu for sanity studio. Som legger til en lenke tilbake root-nettsiden.
9+
* @param props Props som sendes fra sanity studio.
10+
*/
11+
const SanityToolMenu: Component<ToolMenuProps> = props => (
12+
<div style={{ display: "flex", alignItems: "center" }}>
13+
<a
14+
href={process.env.NEXT_PUBLIC_BASE_URL}
15+
rel={"noopener"}
16+
target={"_blank"}
17+
style={{
18+
display: "flex",
19+
alignItems: "center",
20+
gap: "5px",
21+
color: "white",
22+
textDecoration: "none",
23+
fontSize: "small",
24+
}}
25+
title={"Tilbake til Root"}>
26+
<ArrowTopRightOnSquareIcon width={defaultIconSize} />
27+
<p>Root</p>
28+
</a>
29+
<div style={{ width: "100%" }}>{props.renderDefault(props)}</div>
30+
</div>
31+
)
32+
33+
export default SanityToolMenu

0 commit comments

Comments
 (0)