mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 10:25:06 +03:00
33 lines
618 B
JavaScript
33 lines
618 B
JavaScript
import React from 'react'
|
|
import Link from '@docusaurus/Link'
|
|
|
|
export default function ButtonCard({
|
|
children,
|
|
icon,
|
|
title,
|
|
description,
|
|
to,
|
|
layout = 'vertical',
|
|
}) {
|
|
return (
|
|
<Link
|
|
to={to}
|
|
className={['button-card', `button-card--${layout}`].join(' ')}
|
|
>
|
|
{children ? (
|
|
children
|
|
) : (
|
|
<div className="button-card__inner">
|
|
{icon && typeof icon == 'string' ? (
|
|
<img src={icon} width={24} />
|
|
) : (
|
|
icon
|
|
)}
|
|
<h3>{title}</h3>
|
|
<p>{description}</p>
|
|
</div>
|
|
)}
|
|
</Link>
|
|
)
|
|
}
|