jam411 3 лет назад
Родитель
Сommit
b0ae23fd29
1 измененных файлов с 23 добавлено и 0 удалено
  1. 23 0
      packages/app/src/components/ReactMarkdownComponents/Attachment.tsx

+ 23 - 0
packages/app/src/components/ReactMarkdownComponents/Attachment.tsx

@@ -0,0 +1,23 @@
+import React from 'react';
+
+type AttachmentProps = {
+  className?: string,
+  url: string,
+  attachmentName: string,
+}
+
+export const Attachment = React.memo((props: AttachmentProps): JSX.Element => {
+  const { className, url, attachmentName } = props;
+
+  return (
+    <div className="card">
+      <h3 className="card-title m-0">Remark Attachment Component</h3>
+      <div className="card-body">
+        <a className={className} href={url}>
+          {attachmentName}
+        </a>
+      </div>
+    </div>
+  );
+});
+Attachment.displayName = 'Attachment';