fancytextstuff/pages/demo.jsx

33 lines
860 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// pages/demo.jsx
import React from "react";
import FontCard from "@/components/ui/FontCard"; // DefaultImport
import { fonts } from "@/lib/fonts";
export default function Demo() {
// Absicherung gegen undefined beim SSR
const robotoClass = fonts.roboto?.className || "";
return (
<section className="space-y-8 p-8">
{/* 1. next/font (voll integriert) */}
<h2 className={`${robotoClass} text-4xl`}>
Roboto aus next/font
</h2>
{/* 2. TailwindUtility aus Map */}
<p className="font-montserrat text-xl">
Dieselbe Font via <code>font-montserrat</code>
</p>
{/* 3. Deine PreviewKomponente */}
<FontCard
fontName="Pacifico"
transformedText="Hallo Instagram!"
category="handwriting"
isPopular
index={0}
/>
</section>
);
}