summaryrefslogtreecommitdiff
path: root/frontend/src/components/ElementView.tsx
blob: 4f9d4891113dacbe2349a6f5c86879ca737c18ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;