-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from deco-sites/feature/benefits
feat: add benefits component
- Loading branch information
Showing
4 changed files
with
118 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { ImageWidget } from "apps/admin/widgets.ts"; | ||
import Image from "apps/website/components/Image.tsx"; | ||
|
||
interface Card { | ||
/** @title Ícone */ | ||
icon: ImageWidget; | ||
/** @title Largura */ | ||
width?: number; | ||
/** @title Altura */ | ||
height?: number; | ||
alt?: string; | ||
/** @title Descrição */ | ||
description: string; | ||
} | ||
|
||
export interface Props { | ||
/** @title Titulo */ | ||
title: string; | ||
/** @title Cards */ | ||
cards: Card[]; | ||
} | ||
|
||
export default function Benefits({ cards, title }: Props) { | ||
return ( | ||
<div class="default-container"> | ||
<div class="flex flex-col gap-10"> | ||
<div class="flex flex-col items-center"> | ||
<h3 class="text-2xl font-bold text-center lg:text-[32px] text-primary lg:leading-normal max-w-[308px] sm:max-w-[879px]"> | ||
{title} | ||
</h3> | ||
</div> | ||
<div class="flex flex-col gap-6 lg:flex-row"> | ||
{cards.map((card) => ( | ||
<div class="bg-secondary rounded-3xl py-6 px-7 flex flex-col items-center lg:flex-1 gap-5"> | ||
<div class="rounded-full w-[68px] h-[68px] bg-secondary flex items-center justify-center"> | ||
<Image | ||
src={card.icon} | ||
width={card.width || 47} | ||
height={card.height || 47} | ||
alt={card.alt} | ||
/> | ||
</div> | ||
<p class="text-center font-xs text-base-100 "> | ||
{card.description} | ||
</p> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters