-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy pathApp.tsx
44 lines (40 loc) · 1.17 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import * as React from 'react';
import { SafeAreaView } from 'react-native';
import { SwipeablePanel } from 'rn-swipeable-panel';
import { Header } from './src/components/Header';
import { PanelContent } from './src/components/PanelContent';
import useSwipeablePanel from './src/hooks/useSwipeablePanel';
import List from './src/screens/List';
export default function App() {
const {
panelState,
changePanelState,
openAboutPanel,
openSettingsPanel,
openConfigurationsPanel,
openDarkPanel,
openDefaultPanel,
closePanel,
} = useSwipeablePanel();
return (
<>
<SafeAreaView>
<Header title="Examples" />
<List
openDefaultPanel={openDefaultPanel}
openSettingsPanel={openSettingsPanel}
openAboutPanel={openAboutPanel}
openConfigurationsPanel={openConfigurationsPanel}
openDarkPanel={openDarkPanel}
/>
</SafeAreaView>
<SwipeablePanel {...panelState} onClose={closePanel}>
<PanelContent
contentType={panelState.contentType}
panelState={panelState}
changePanelState={changePanelState}
/>
</SwipeablePanel>
</>
);
}