import Button from "@geist-ui/core/dist/button" import Card from "@geist-ui/core/dist/card" import ButtonGroup from "@geist-ui/core/dist/button-group" import Input from "@geist-ui/core/dist/input" import Spacer from "@geist-ui/core/dist/spacer" import Tabs from "@geist-ui/core/dist/tabs" import Textarea from "@geist-ui/core/dist/textarea" import Tooltip from "@geist-ui/core/dist/tooltip" import { ChangeEvent, memo, useCallback, useMemo, useRef, useState } from "react" import styles from './document.module.css' import Trash from '@geist-ui/icons/trash' import Download from '@geist-ui/icons/download' import ExternalLink from '@geist-ui/icons/externalLink' import FormattingIcons from "./formatting-icons" import Skeleton from "react-loading-skeleton" import dynamic from "next/dynamic"; const MarkdownPreview = dynamic(() => import("../preview")) // import Link from "next/link" type Props = { editable?: boolean remove?: () => void title?: string content?: string setTitle?: (title: string) => void setContent?: (content: string) => void initialTab?: "edit" | "preview" skeleton?: boolean id?: string } const DownloadButton = ({ rawLink }: { rawLink?: string }) => { return (
) } const Document = ({ remove, editable, title, content, setTitle, setContent, initialTab = 'edit', skeleton, id }: Props) => { const codeEditorRef = useRef