diff options
Diffstat (limited to 'components/Sidebar')
-rw-r--r-- | components/Sidebar/Backlinks.tsx | 5 | ||||
-rw-r--r-- | components/Sidebar/Link.tsx | 6 | ||||
-rw-r--r-- | components/Sidebar/Note.tsx | 5 | ||||
-rw-r--r-- | components/Sidebar/index.tsx | 3 |
4 files changed, 19 insertions, 0 deletions
diff --git a/components/Sidebar/Backlinks.tsx b/components/Sidebar/Backlinks.tsx index 892af8c..9bfb1fe 100644 --- a/components/Sidebar/Backlinks.tsx +++ b/components/Sidebar/Backlinks.tsx @@ -16,6 +16,8 @@ export interface BacklinksProps { setSidebarHighlightedNode: OrgRoamNode openContextMenu: any outline: boolean + attachDir: string + macros: { [key: string]: string } } import { PreviewLink } from './Link' @@ -32,6 +34,8 @@ export const Backlinks = (props: BacklinksProps) => { nodeByCite, openContextMenu, outline, + macros, + attachDir, } = props const links = linksByNodeId[previewNode?.id] ?? [] @@ -69,6 +73,7 @@ export const Backlinks = (props: BacklinksProps) => { openContextMenu={openContextMenu} outline={outline} noUnderline + {...{ attachDir, macros }} > {nodeById[link as string]?.title} </PreviewLink> diff --git a/components/Sidebar/Link.tsx b/components/Sidebar/Link.tsx index c4eea2f..e5b1102 100644 --- a/components/Sidebar/Link.tsx +++ b/components/Sidebar/Link.tsx @@ -41,6 +41,8 @@ export interface LinkProps { linksByNodeId: LinksByNodeId isWiki?: boolean noUnderline?: boolean + attachDir: string + macros: { [key: string]: string } } export interface NodeLinkProps { @@ -138,6 +140,8 @@ export const PreviewLink = (props: LinkProps) => { noUnderline, linksByNodeId, isWiki, + macros, + attachDir, } = props // TODO figure out how to properly type this // see https://github.com/rehypejs/rehype-react/issues/25 @@ -290,6 +294,8 @@ export const PreviewLink = (props: LinkProps) => { openContextMenu, outline, linksByNodeId, + macros, + attachDir, }} previewNode={nodeById[id]!} collapse={false} diff --git a/components/Sidebar/Note.tsx b/components/Sidebar/Note.tsx index 1f864f3..2b76994 100644 --- a/components/Sidebar/Note.tsx +++ b/components/Sidebar/Note.tsx @@ -21,6 +21,7 @@ export interface NoteProps { outline: boolean collapse: boolean macros?: { [key: string]: string } + attachDir: string } export const Note = (props: NoteProps) => { @@ -37,6 +38,7 @@ export const Note = (props: NoteProps) => { outline, collapse, macros, + attachDir, } = props const extraStyle = outline ? outlineNoteStyle : viewerNoteStyle @@ -71,6 +73,7 @@ export const Note = (props: NoteProps) => { nodeById, linksByNodeId, macros, + attachDir, }} /> <Backlinks @@ -83,7 +86,9 @@ export const Note = (props: NoteProps) => { setSidebarHighlightedNode, openContextMenu, outline, + attachDir, }} + macros={macros || {}} /> </Flex> )} diff --git a/components/Sidebar/index.tsx b/components/Sidebar/index.tsx index c23d938..66728fd 100644 --- a/components/Sidebar/index.tsx +++ b/components/Sidebar/index.tsx @@ -50,6 +50,7 @@ export interface SidebarProps { tagColors: TagColors setTagColors: any macros?: { [key: string]: string } + attachDir: string } const Sidebar = (props: SidebarProps) => { @@ -77,6 +78,7 @@ const Sidebar = (props: SidebarProps) => { tagColors, setTagColors, macros, + attachDir, } = props const { highlightColor } = useContext(ThemeContext) @@ -228,6 +230,7 @@ const Sidebar = (props: SidebarProps) => { setOutline, collapse, macros, + attachDir, }} /> </VStack> |