1import Checkbox from 'expo-checkbox';
2import * as React from 'react';
3import { Platform } from 'react-native';
4
5import { Page, Section } from '../components/Page';
6
7export default function CheckboxScreen() {
8  const [value, setValue] = React.useState(true);
9
10  return (
11    <Page>
12      <Section title="Default">
13        <Checkbox value={value} onValueChange={setValue} />
14      </Section>
15      <Section title="Custom Color">
16        <Checkbox value={value} onValueChange={setValue} color="#4630EB" />
17      </Section>
18      <Section title="Disabled">
19        <Checkbox disabled value={value} />
20      </Section>
21      {Platform.OS === 'web' && (
22        <Section title="Larger">
23          <Checkbox value={value} onValueChange={setValue} style={{ height: 32, width: 32 }} />
24        </Section>
25      )}
26    </Page>
27  );
28}
29
30CheckboxScreen.navigationOptions = {
31  title: 'Checkbox',
32};
33