summaryrefslogtreecommitdiff
path: root/util/processOrg.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2022-01-31 16:37:30 +0100
committerGitHub <[email protected]>2022-01-31 16:37:30 +0100
commit6672bc2549b2ea0f17dbdee7c5425653b9b248d4 (patch)
tree66c45875fa8c65fe3bedfacec4320212a8cad550 /util/processOrg.tsx
parentdae41a72774a5bcfbda8412f5c811a4c1c2281a3 (diff)
parent4201226df4d3e3231293eb7dde7f41ddf9899834 (diff)
Merge pull request #209 from org-roam/fix/207
Diffstat (limited to 'util/processOrg.tsx')
-rw-r--r--util/processOrg.tsx19
1 files changed, 16 insertions, 3 deletions
diff --git a/util/processOrg.tsx b/util/processOrg.tsx
index aa0118d..fa135a1 100644
--- a/util/processOrg.tsx
+++ b/util/processOrg.tsx
@@ -35,7 +35,7 @@ import { OrgRoamLink, OrgRoamNode } from '../api'
// @ts-expect-error non-ESM unified means no types
import { toString } from 'hast-util-to-string'
-import { Box } from '@chakra-ui/react'
+import { Box, chakra } from '@chakra-ui/react'
export interface ProcessedOrgProps {
nodeById: NodeById
@@ -165,8 +165,6 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => {
return <OrgImage src={src as string} file={previewNode?.file} />
},
section: ({ children, className }) => {
- console.log(className)
- console.log(previewNode.level)
if (className && (className as string).slice(-1) === `${previewNode.level}`) {
return <Box>{(children as React.ReactElement[]).slice(1)}</Box>
}
@@ -176,6 +174,21 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => {
</Section>
)
},
+ blockquote: ({ children }) => (
+ <chakra.blockquote
+ color="gray.800"
+ bgColor="gray.300"
+ pt={4}
+ pb={2}
+ mb={4}
+ mt={3}
+ pl={4}
+ borderLeftWidth={4}
+ borderLeftColor="gray.700"
+ >
+ {children as React.ReactElement[]}
+ </chakra.blockquote>
+ ),
p: ({ children }) => {
return <p lang="en">{children as ReactNode}</p>
},