forked from lydiahallie/javascript-react-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFeatures.tsx
54 lines (51 loc) · 1.1 KB
/
Features.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import {
LightningBoltIcon,
PuzzleIcon,
CogIcon,
} from "@heroicons/react/outline";
const features = [
{
name: "Design Patterns",
icon: PuzzleIcon,
},
{
name: " React Patterns",
icon: () => <img src="/react.svg" height="24" width="24" />,
},
{
name: "Rendering Patterns",
icon: CogIcon,
},
{
name: "Performance Patterns",
icon: LightningBoltIcon,
},
];
function Features() {
return (
<>
<div className="grid grid-cols-1 gap-3 my-12">
{features.map(({ icon: Icon, ...feature }, i) => (
<div
className="flex items-center space-x-4"
key={feature.name.split(" ").join("-")}
>
<div>
<Icon
className="block w-8 h-8"
style={{ height: 24, width: 24 }}
aria-hidden="true"
/>
</div>
<div>
<div className="my-0 font-small dark:text-white">
{feature.name}
</div>
</div>
</div>
))}
</div>
</>
);
}
export default Features;