UI: Fix banner preview

This commit is contained in:
Fuma Nama
2025-01-13 10:24:43 +08:00
parent 5b76a26d86
commit 26d9ccb921
5 changed files with 21 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-ui': patch
---
Fix banner preview
+12 -6
View File
@@ -21,6 +21,7 @@ import OpenPanel from '@/public/showcases/openpanel.png';
import Supastarter from '@/public/showcases/supastarter.png';
import BetterAuth from '@/public/showcases/better-auth.png';
import LaunchFast from '@/public/showcases/launchfast.png';
import ArkType from '@/public/showcases/arktype.png';
export const metadata = createMetadata({
title: 'Showcase',
@@ -54,9 +55,9 @@ export default function Showcase(): React.ReactElement {
url: 'https://million.dev',
},
{
image: Yeecord,
name: 'Yeecord Docs',
url: 'https://yeecord.com',
image: BetterAuth,
name: 'Better Auth',
url: 'https://better-auth.com',
},
{ image: Nuqs, name: 'nuqs', url: 'https://nuqs.47ng.com' },
{
@@ -70,9 +71,9 @@ export default function Showcase(): React.ReactElement {
url: 'https://docs.hiro.so/stacks',
},
{
image: BetterAuth,
name: 'Better Auth',
url: 'https://better-auth.com',
image: ArkType,
name: 'Arktype',
url: 'https://arktype.io',
},
{
image: OpenPanel,
@@ -89,6 +90,11 @@ export default function Showcase(): React.ReactElement {
name: 'Sunar',
url: 'https://sunar.js.org',
},
{
image: Yeecord,
name: 'Yeecord Docs',
url: 'https://yeecord.com',
},
{
image: Supastarter,
name: 'SupaStarter',
Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

+4 -1
View File
@@ -48,11 +48,14 @@ export function Banner({
id={id}
{...props}
className={cn(
'sticky top-0 z-40 flex h-[var(--fd-banner-height)] flex-row items-center justify-center bg-fd-secondary px-4 text-center text-sm font-medium',
'sticky top-0 z-40 flex flex-row items-center justify-center bg-fd-secondary px-4 text-center text-sm font-medium',
variant === 'rainbow' && 'bg-fd-background',
!open && 'hidden',
props.className,
)}
style={{
height,
}}
>
{changeLayout && open ? (
<style>