Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Handles children in ButtonCard component

Terry Sutton453fc10c08e6
diff --git a/apps/reference/docs/guides/auth.mdx b/apps/reference/docs/guides/auth.mdx
index 036afefd6ed..353c10092e4 100644
--- a/apps/reference/docs/guides/auth.mdx
+++ b/apps/reference/docs/guides/auth.mdx
@@ -9,6 +9,8 @@ import Link from '@docusaurus/Link'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import providers from '@site/src/data/authProviders'
+import ButtonCard from '@site/src/components/ButtonCard'
+import useBaseUrl from '@docusaurus/useBaseUrl'
<div class="video-container">
<iframe
@@ -46,7 +48,12 @@ We provide a suite of Providers and login methods.
<div class="row is-multiline">
{providers.map((x) => (
<div key={x.name} class="col col--6">
- <Link class="button-card button-card--vertical" to={x.href}>
+ <ButtonCard
+ class="card"
+ to={useBaseUrl(x.href)}
+ title={x.name}
+ style={{ height: '100%' }}
+ >
<div class="button-card__inner">
<div
class=""
@@ -93,7 +100,7 @@ We provide a suite of Providers and login methods.
</div>
</div>
</div>
- </Link>
+ </ButtonCard>
</div>
))}
</div>
diff --git a/apps/reference/src/components/ButtonCard.js b/apps/reference/src/components/ButtonCard.js
index 69083291f0b..ce4f8993441 100644
--- a/apps/reference/src/components/ButtonCard.js
+++ b/apps/reference/src/components/ButtonCard.js
@@ -15,11 +15,19 @@ export default function ButtonCard({
to={to}
className={['button-card', `button-card--${layout}`].join(' ')}
>
- <div className="button-card__inner">
- {icon && typeof icon == 'string' ? <img src={icon} width={24} /> : icon}
- <h3>{title}</h3>
- <p>{description}</p>
- </div>
+ {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>
)
}