diff options
Diffstat (limited to 'apps/website/src/components/base/Card.astro')
-rw-r--r-- | apps/website/src/components/base/Card.astro | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/website/src/components/base/Card.astro b/apps/website/src/components/base/Card.astro new file mode 100644 index 0000000..b3fbc00 --- /dev/null +++ b/apps/website/src/components/base/Card.astro @@ -0,0 +1,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 pl-[12px] pr-[32px]">{text}</p> +</div> |