import React, { useState } from 'react';
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonList, IonRadioGroup, IonListHeader, IonLabel, IonItem, IonRadio, IonItemDivider } from '@ionic/react';
export const RadioExamples: React.FC = () => {
const [selected, setSelected] = useState<string>('biff');
return (
<IonPage>
<IonHeader>
<IonToolbar>
<IonTitle>Radio Examples</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent>
<IonList>
<IonRadioGroup value={selected} onIonChange={e => setSelected(e.detail.value)}>
<IonListHeader>
<IonLabel>Name</IonLabel>
</IonListHeader>
<IonItem>
<IonLabel>Biff</IonLabel>
<IonRadio slot="start" value="biff" />
</IonItem>
<IonItem>
<IonLabel>Griff</IonLabel>
<IonRadio slot="start" value="griff" />
</IonItem>
<IonItem>
<IonLabel>Buford</IonLabel>
<IonRadio slot="start" value="buford" />
</IonItem>
</IonRadioGroup>
<IonItemDivider>Your Selection</IonItemDivider>
<IonItem>{selected ?? '(none selected'}</IonItem>
</IonList>
</IonContent>
</IonPage>
);
};