Skip to content

Commit a3147c7

Browse files
committed
Refact: Adds new icons to missao, visao e valores
1 parent ea245af commit a3147c7

4 files changed

Lines changed: 26 additions & 8 deletions

File tree

public/sprite.svg

Lines changed: 16 additions & 1 deletion
Loading

src/app/quem-somos/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ export default async function QuemSomos() {
4242
</h2>
4343

4444
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
45-
<InfoCard emoji="🔭" title="Visão" color={getRandomBrandColor(colors)}>
45+
<InfoCard icon="eye" title="Visão" color={getRandomBrandColor(colors)}>
4646
{documentToReactComponents(vision.json)}
4747
</InfoCard>
4848

49-
<InfoCard emoji="🚀" title="Missão" color={getRandomBrandColor(colors)}>
49+
<InfoCard icon="target" title="Missão" color={getRandomBrandColor(colors)}>
5050
{documentToReactComponents(mission.json)}
5151
</InfoCard>
5252
</div>
5353

54-
<InfoCard emoji="⭐" title="Valores" color={getRandomBrandColor(colors)}>
54+
<InfoCard icon="star" title="Valores" color={getRandomBrandColor(colors)}>
5555
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3">
5656
{values.map((value) => (
5757
<div

src/components/Icon.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ export const Icon = ({
1515
"aria-label"?: string;
1616
onClick?: React.MouseEventHandler<SVGSVGElement>;
1717
className?: string;
18+
style?: React.CSSProperties;
1819
}) => {
1920
return (
2021
<svg
2122
{...props}
2223
onClick={onClick}
2324
width={size ?? width}
2425
height={size ?? height}
26+
fill="currentColor"
2527
>
2628
<use href={`/sprite.svg#${id}`} />
2729
</svg>

src/components/InfoCard.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
import { ReactNode } from "react";
2+
import { Icon } from "./Icon";
23

34
interface InfoCardProps {
4-
emoji: string;
5+
icon: string;
56
title: string;
67
color: string;
78
children: ReactNode;
89
}
910

10-
export const InfoCard = ({ emoji, title, color, children }: InfoCardProps) => {
11+
export const InfoCard = ({ icon, title, color, children }: InfoCardProps) => {
1112
return (
1213
<div
1314
className="rounded-xl border-t-4 p-6 bg-white flex flex-col gap-4"
1415
style={{ borderTopColor: color }}
1516
>
1617
<div className="flex items-center gap-3">
17-
<span className="text-3xl">{emoji}</span>
18+
<Icon id={icon} size={28} style={{ color }} />
1819
<h2 className="text-lg font-bold text-gray-900">{title}</h2>
1920
</div>
2021
<div className="text-gray-700 text-sm">{children}</div>
2122
</div>
2223
);
23-
};
24+
};

0 commit comments

Comments
 (0)