aboutsummaryrefslogtreecommitdiff
path: root/apps/website/src/components/base/Card.astro
blob: 9b75f165b3532c9ea1bd49bb872eafa0745f5be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
import type { Icons } from '@components/icons/Icon.astro';
import Icon from '@components/icons/Icon.astro';
import type { HTMLAttributes } from 'astro/types';

interface Props extends HTMLAttributes<'div'> {
	icon: Icons
	text?: string
}

const {
	icon,
	text = 'Hiiii',
	...rest
} = Astro.props;
---

<!-- pt-1 added temporarily cause for some reason the icon's padding doesn't apply unless I add this. the wonders of CSS. -->
<div {...rest} class="rounded-xl bg-gray-600 w-64 pt-1 shrink-0">
	<Icon icon={icon} size={48} class="my-[20px] mx-auto text-white"></Icon>
	<p class="text-white text-md mx-auto bg-primary-600 rounded-b-xl py-[5px] pl-[12px] pr-[32px]">{text}</p>
</div>