Skip to content

Instantly share code, notes, and snippets.

@alarner
Last active April 10, 2020 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alarner/327842c3a52b3fba240a7ac4727bd6ae to your computer and use it in GitHub Desktop.
Save alarner/327842c3a52b3fba240a7ac4727bd6ae to your computer and use it in GitHub Desktop.
import React, { useState } from 'react';
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonCheckbox, IonButton } from '@ionic/react';
import './Tab2.css';
const Tab2: React.FC = () => {
const [ checked, setChecked ] = useState(false);
return (
<IonPage>
<IonHeader>
<IonToolbar>
<IonTitle>Tab 2</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent>
<IonButton onClick={() => setChecked(true)}>check all</IonButton>
<IonCheckbox checked={checked} onIonChange={e => setChecked(!e.detail.checked)} />
</IonContent>
</IonPage>
);
};
export default Tab2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment