Files
HKSingleParty/99_references/ionic-react-conference-app/src/components/AboutPopover.tsx
2025-05-28 09:55:51 +08:00

45 lines
1.1 KiB
TypeScript

import React from 'react';
import { IonList, IonItem, IonLabel } from '@ionic/react';
interface AboutPopoverProps {
dismiss: () => void;
}
const AboutPopover: React.FC<AboutPopoverProps> = ({ dismiss }) => {
const close = (url: string) => {
window.open(url, '_blank');
dismiss();
};
return (
<IonList>
<IonItem button onClick={() => close('https://ionicframework.com/docs')}>
<IonLabel>Learn Ionic</IonLabel>
</IonItem>
<IonItem
button
onClick={() => close('https://ionicframework.com/docs/react')}
>
<IonLabel>Documentation</IonLabel>
</IonItem>
<IonItem
button
onClick={() => close('https://showcase.ionicframework.com')}
>
<IonLabel>Showcase</IonLabel>
</IonItem>
<IonItem
button
onClick={() => close('https://github.com/ionic-team/ionic-framework')}
>
<IonLabel>GitHub Repo</IonLabel>
</IonItem>
<IonItem button onClick={dismiss}>
<IonLabel>Support</IonLabel>
</IonItem>
</IonList>
);
};
export default AboutPopover;