khulnasoft commited on
Commit
9e77d0e
·
verified ·
1 Parent(s): a171b0f

Create icon.tsx

Browse files
Files changed (1) hide show
  1. icon.tsx +30 -0
icon.tsx ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /* tslint:disable */
6
+ import React from 'react';
7
+ import {AppDefinition} from '../types';
8
+
9
+ interface IconProps {
10
+ app: AppDefinition;
11
+ onInteract: () => void;
12
+ }
13
+
14
+ export const Icon: React.FC<IconProps> = ({app, onInteract}) => {
15
+ return (
16
+ <div
17
+ className="w-28 h-32 flex flex-col items-center justify-start text-center m-2 p-2 cursor-pointer select-none rounded-lg transition-colors hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500" // Increased w-24 h-28 to w-28 h-32
18
+ onClick={onInteract}
19
+ onKeyDown={(e) => e.key === 'Enter' && onInteract()}
20
+ tabIndex={0}
21
+ role="button"
22
+ aria-label={`Open ${app.name}`}>
23
+ <div className="text-6xl mb-2 drop-shadow-sm">{app.icon}</div>{' '}
24
+ {/* Increased text-5xl to text-6xl */}
25
+ <div className="text-sm text-gray-800 font-semibold break-words max-w-full leading-tight">
26
+ {app.name}
27
+ </div>
28
+ </div>
29
+ );
30
+ };