summaryrefslogtreecommitdiff
path: root/components/preview.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-09-27 13:36:58 +0200
committerThomas F. K. Jorna <[email protected]>2021-09-27 13:36:58 +0200
commitec6f3e51bb7f33594c7d0151fc3bf1f09db4115a (patch)
treeaf8925f3a75c6b5454ac5005a4263c2446e0d351 /components/preview.tsx
parentcb29db132f79f9d35b323ae12524137cf5985018 (diff)
feat: get org text from emacs
Diffstat (limited to 'components/preview.tsx')
-rw-r--r--components/preview.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/components/preview.tsx b/components/preview.tsx
new file mode 100644
index 0000000..8d3a1ca
--- /dev/null
+++ b/components/preview.tsx
@@ -0,0 +1,20 @@
+import { Box, Heading } from '@chakra-ui/react'
+import React from 'react'
+import UniOrg from '../util/uniorg'
+import getOrgText from '../util/getOrgText'
+
+export interface PreviewProps {
+ id: string
+ title: string
+}
+export const Preview = (props: PreviewProps) => {
+ const { id, title } = props
+ const text = getOrgText(id)
+
+ return (
+ <Box>
+ <Heading>{title}</Heading>
+ <UniOrg orgText={text} />
+ </Box>
+ )
+}