Files
PapatMayuri 95acd8b481 updated with-ionic-typescript example to utilize the App Router. (#73418)
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>
2024-12-10 05:37:13 +00:00

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>
);
}