From ec6f3e51bb7f33594c7d0151fc3bf1f09db4115a Mon Sep 17 00:00:00 2001
From: "Thomas F. K. Jorna" <hello@tefkah.com>
Date: Mon, 27 Sep 2021 13:36:58 +0200
Subject: feat: get org text from emacs

---
 components/preview.tsx | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 components/preview.tsx

(limited to 'components/preview.tsx')

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>
+  )
+}
-- 
cgit v1.2.3

