mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
95acd8b481
This PR updates the with-ionic-typescript example for using the App Router. Here are the changes that have been made: - I renamed the `pages` folder and moved it to the `app` folder. - Added the `layout.tsx` file as part of the App Router. - Updated the `package.json` file. CC: @samcx --------- Co-authored-by: Sam Ko <sam@vercel.com>
36 lines
695 B
TypeScript
36 lines
695 B
TypeScript
import Image from "next/image";
|
|
|
|
type CardProps = {
|
|
imageSrc: string;
|
|
title: string;
|
|
subtitle: string;
|
|
content: string;
|
|
};
|
|
|
|
export default function Card({
|
|
imageSrc,
|
|
title,
|
|
subtitle,
|
|
content,
|
|
}: CardProps) {
|
|
return (
|
|
<ion-card>
|
|
<Image
|
|
src={imageSrc}
|
|
alt={`Image of ${title}`}
|
|
width={320}
|
|
height={320}
|
|
priority={true}
|
|
/>
|
|
<ion-card-header>
|
|
<ion-card-subtitle>{subtitle}</ion-card-subtitle>
|
|
<ion-card-title>{title}</ion-card-title>
|
|
</ion-card-header>
|
|
<ion-card-content>
|
|
<ion-icon name="pin" slot="start"></ion-icon>
|
|
{content}
|
|
</ion-card-content>
|
|
</ion-card>
|
|
);
|
|
}
|