test: clickable-span test page

This commit is contained in:
Eduardo Speroni
2019-03-26 18:58:59 -03:00
parent dbb5684153
commit 6ee8fc0ce7
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import { EventData, TextBase } from "tns-core-modules/ui/text-base";
export function foxTap(args: EventData) {
console.log("foxTap");
}
export function dogTap(args: EventData) {
console.log("dogTap");
}

View File

@@ -0,0 +1,17 @@
<Page>
<StackLayout>
<Label automationText="formattedText" id="formattedText" textWrap="true" style="text-transform: capitalize;">
<Label.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="The quick brown " style="font-weight: bold; color: green;" />
<Span text="fox" style="font-weight: italic; color: green;" linkClick="foxTap"/>
<Span text=" jumps over the lazy " style="font-weight: bold; color: red;" />
<Span text="dog" style="font-weight: bold; color: blue;" linkClick="dogTap"/>
<Span text="." style="font-weight: bold; color: green;" />
</FormattedString.spans>
</FormattedString>
</Label.formattedText>
</Label>
</StackLayout>
</Page>

View File

@@ -44,5 +44,6 @@ export function loadExamples() {
examples.set("background-shorthand", "css/background-shorthand");
examples.set("background-image-linear-gradient", "css/background-image-linear-gradient");
examples.set("background-image", "css/background-image");
examples.set("clickable-span", "css/clickable-span");
return examples;
}