From 33d1d72d5e7f2e8e7f846bbf8651d7f128765c64 Mon Sep 17 00:00:00 2001
From: Paweł Bernaciak <pawelbernaciak@zohomail.eu>
Date: Fri, 27 Oct 2023 16:09:31 +0200
Subject: New frontend project

---
 frontend/src/components/ElementView.tsx | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 frontend/src/components/ElementView.tsx

(limited to 'frontend/src/components/ElementView.tsx')

diff --git a/frontend/src/components/ElementView.tsx b/frontend/src/components/ElementView.tsx
new file mode 100644
index 0000000..4f9d489
--- /dev/null
+++ b/frontend/src/components/ElementView.tsx
@@ -0,0 +1,19 @@
+import { FC } from 'react';
+import { Element } from '../types';
+
+interface ElementViewProps {
+  element: Element;
+}
+
+const ElementView: FC<ElementViewProps> = ({ element }) => {
+  return (
+    <div className='flex flex-row m-2 rounded-md border border-gray-300 bg-gray-100 w-fit h-fit'>
+      <div className='flex flex-col items-center'>
+        <img src={`data:image/png;base64,${element.icon}`} width='80px' height='80px'/>
+        <p className='my-1 mx-2 text-sm'>{element.name}</p>
+      </div>
+    </div>
+  );
+};
+
+export default ElementView;
-- 
cgit v1.2.3

