summaryrefslogtreecommitdiff
path: root/components/Sidebar
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2022-07-13 13:23:57 +0200
committerGitHub <[email protected]>2022-07-13 13:23:57 +0200
commit46f8c23da389b6777169248ed3e33f55e3dcbece (patch)
tree34abd3ac10a1112baaea318cf5e38eabe33acb0a /components/Sidebar
parent9474a254390b1e42488a1801fed5826b32a8030b (diff)
parent11111bb49889feb1b00e6814d9d81e3e23409d7c (diff)
Merge pull request #247 from danhuynhdev/main
Diffstat (limited to 'components/Sidebar')
-rw-r--r--components/Sidebar/Backlinks.tsx4
-rw-r--r--components/Sidebar/Link.tsx3
-rw-r--r--components/Sidebar/Note.tsx4
-rw-r--r--components/Sidebar/index.tsx3
4 files changed, 13 insertions, 1 deletions
diff --git a/components/Sidebar/Backlinks.tsx b/components/Sidebar/Backlinks.tsx
index 6a5dd00..0bbf415 100644
--- a/components/Sidebar/Backlinks.tsx
+++ b/components/Sidebar/Backlinks.tsx
@@ -17,6 +17,7 @@ export interface BacklinksProps {
openContextMenu: any
outline: boolean
attachDir: string
+ useInheritance: boolean
macros: { [key: string]: string }
}
@@ -36,6 +37,7 @@ export const Backlinks = (props: BacklinksProps) => {
outline,
macros,
attachDir,
+ useInheritance,
} = props
const links = linksByNodeId[(previewNode as OrgRoamNode)?.id] ?? []
@@ -73,7 +75,7 @@ export const Backlinks = (props: BacklinksProps) => {
openContextMenu={openContextMenu}
outline={outline}
noUnderline
- {...{ attachDir, macros }}
+ {...{ attachDir, useInheritance, macros }}
>
{nodeById[link as string]?.title}
</PreviewLink>
diff --git a/components/Sidebar/Link.tsx b/components/Sidebar/Link.tsx
index 6130eb5..2f1ad64 100644
--- a/components/Sidebar/Link.tsx
+++ b/components/Sidebar/Link.tsx
@@ -42,6 +42,7 @@ export interface LinkProps {
isWiki?: boolean
noUnderline?: boolean
attachDir: string
+ useInheritance: boolean
macros: { [key: string]: string }
}
@@ -142,6 +143,7 @@ export const PreviewLink = (props: LinkProps) => {
isWiki,
macros,
attachDir,
+ useInheritance,
} = props
// TODO figure out how to properly type this
// see https://github.com/rehypejs/rehype-react/issues/25
@@ -296,6 +298,7 @@ export const PreviewLink = (props: LinkProps) => {
linksByNodeId,
macros,
attachDir,
+ useInheritance,
}}
previewNode={nodeById[id]!}
collapse={false}
diff --git a/components/Sidebar/Note.tsx b/components/Sidebar/Note.tsx
index 2b76994..638b43a 100644
--- a/components/Sidebar/Note.tsx
+++ b/components/Sidebar/Note.tsx
@@ -22,6 +22,7 @@ export interface NoteProps {
collapse: boolean
macros?: { [key: string]: string }
attachDir: string
+ useInheritance: boolean
}
export const Note = (props: NoteProps) => {
@@ -39,6 +40,7 @@ export const Note = (props: NoteProps) => {
collapse,
macros,
attachDir,
+ useInheritance,
} = props
const extraStyle = outline ? outlineNoteStyle : viewerNoteStyle
@@ -74,6 +76,7 @@ export const Note = (props: NoteProps) => {
linksByNodeId,
macros,
attachDir,
+ useInheritance,
}}
/>
<Backlinks
@@ -87,6 +90,7 @@ export const Note = (props: NoteProps) => {
openContextMenu,
outline,
attachDir,
+ useInheritance,
}}
macros={macros || {}}
/>
diff --git a/components/Sidebar/index.tsx b/components/Sidebar/index.tsx
index 66728fd..e112699 100644
--- a/components/Sidebar/index.tsx
+++ b/components/Sidebar/index.tsx
@@ -51,6 +51,7 @@ export interface SidebarProps {
setTagColors: any
macros?: { [key: string]: string }
attachDir: string
+ useInheritance: boolean
}
const Sidebar = (props: SidebarProps) => {
@@ -79,6 +80,7 @@ const Sidebar = (props: SidebarProps) => {
setTagColors,
macros,
attachDir,
+ useInheritance,
} = props
const { highlightColor } = useContext(ThemeContext)
@@ -231,6 +233,7 @@ const Sidebar = (props: SidebarProps) => {
collapse,
macros,
attachDir,
+ useInheritance,
}}
/>
</VStack>