test(safe-area): add component examples

Update `nativescript-dev-webpack` dependencies.
This commit is contained in:
Vasil Chimev
2018-07-24 13:37:21 +03:00
committed by Martin Yankov
parent 30be10e4de
commit 2d0d36c6d8
8 changed files with 51 additions and 17 deletions

View File

@@ -0,0 +1,10 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:fragments="component/fragments" backgroundColor="LightGreen">
<ActionBar>
<Label text="Action Bar"></Label>
</ActionBar>
<fragments:label-fragment></fragments:label-fragment>
</Page>

View File

@@ -0,0 +1,8 @@
import { View, EventData } from "tns-core-modules/ui/core/view/view";
export function onNavigate(args: EventData) {
const view = args.object as View;
const route = view["route"];
view.page.frame.navigate(route);
}

View File

@@ -0,0 +1,18 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
<ActionBar>
<Label text="Component Examples"></Label>
</ActionBar>
<StackLayout horizontalAlignment="center">
<StackLayout>
<Label text="Pages w/ ActionBar"></Label>
<Button text="Label Component" tap="onNavigate" route="component/action-bar/component-page"></Button>
</StackLayout>
<StackLayout>
<Label text="Pages w/o ActionBar"></Label>
<Button text="Label Component" tap="onNavigate" route="component/no-action-bar/component-page"></Button>
</StackLayout>
</StackLayout>
</Page>

View File

@@ -0,0 +1 @@
<Label text="The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog." backgroundColor="LightBlue"></Label>

View File

@@ -0,0 +1,6 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:fragments="component/fragments" actionBarHidden="true" backgroundColor="LightGreen">
<fragments:label-fragment></fragments:label-fragment>
</Page>

View File

@@ -5,4 +5,4 @@ export function onNavigate(args: EventData) {
const route = view["route"];
view.page.frame.navigate(route);
}
}

View File

@@ -1,11 +1,12 @@
<Page class="page" xmlns="http://schemas.nativescript.org/tns.xsd">
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
<ActionBar class="action-bar">
<Label class="action-bar-title" text="Home"></Label>
</ActionBar>
<StackLayout>
<Button text="GridLayout Examples" tap="onNavigate" route="gridlayout/gridlayout-page" />
<Button text="ScrollView Examples" tap="onNavigate" route="scrollview/scrollview-page" />
<Button text="GridLayout Examples" tap="onNavigate" route="gridlayout/gridlayout-page"></Button>
<Button text="ScrollView Examples" tap="onNavigate" route="scrollview/scrollview-page"></Button>
<Button text="Component Examples" tap="onNavigate" route="component/component-page"></Button>
</StackLayout>
</Page>

View File

@@ -20,20 +20,10 @@
"@types/chai": "~4.1.3",
"@types/mocha": "~5.2.1",
"@types/node": "^7.0.5",
"awesome-typescript-loader": "~5.0.0",
"clean-webpack-plugin": "~0.1.19",
"copy-webpack-plugin": "~4.5.1",
"css-loader": "~0.28.11",
"extract-text-webpack-plugin": "~3.0.2",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"nativescript-worker-loader": "~0.9.0",
"raw-loader": "~0.5.1",
"uglifyjs-webpack-plugin": "~1.2.5",
"webpack": "~4.6.0",
"webpack-bundle-analyzer": "~2.13.0",
"webpack-cli": "~2.1.3",
"webpack-sources": "~1.1.0"
"typescript": "~2.7.2"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ./e2e/config/mocha.opts",