-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathAllSides.svelte
42 lines (36 loc) · 1.69 KB
/
AllSides.svelte
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
<script lang="typescript">
import { Drawer } from '@nativescript-community/ui-drawer';
let drawer: Drawer;
function onOpenDrawer(side) {
drawer.open(side);
}
</script>
<page>
<actionBar title="All Sides">
<navigationButton text="Go back" />
</actionBar>
<stackLayout>
<drawer bind:this={drawer} class="drawer">
<gridlayout prop:leftDrawer width="65%" backgroundColor="white" padding="25">
<label text="Left Drawer" verticalAlignment="top" />
</gridlayout>
<gridlayout prop:rightDrawer width="65%" backgroundColor="white" padding="25">
<label text="Right Drawer" verticalAlignment="top" />
</gridlayout>
<gridlayout prop:topDrawer height="65%" backgroundColor="white" padding="25">
<label text="Top Drawer" verticalAlignment="top" />
</gridlayout>
<gridlayout prop:bottomDrawer height="65%" backgroundColor="white" padding="25">
<label text="Bottom Drawer" verticalAlignment="top" />
</gridlayout>
<stacklayout prop:mainContent backgroundColor="white">
<button on:tap={() => onOpenDrawer('left')} text="Open Left Drawer" width="250" marginTop="25" />
<button on:tap={() => onOpenDrawer('right')} text="Open Right Drawer" width="250" marginTop="25" />
<button on:tap={() => onOpenDrawer('top')} text="Open Top Drawer" width="250" marginTop="25" />
<button on:tap={() => onOpenDrawer('bottom')} text="Open Bottom Drawer" width="250" marginTop="25" />
</stacklayout>
</drawer>
</stackLayout>
</page>
<style>
</style>