Files
NativeScript/e2e/ui-tests-app/app/fonts-tests/label-page.ts
2019-06-26 15:13:48 +03:00

17 lines
572 B
TypeScript

import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout";
import { View, unsetValue, eachDescendant } from "tns-core-modules/ui/core/view";
export function resetStyles(args) {
var stackLayout = <StackLayout>args.object.parent;
eachDescendant(stackLayout, function (v: View) {
v.style.fontFamily = unsetValue;
v.style.fontSize = unsetValue;
v.style.fontStyle = unsetValue;
v.style.fontWeight = unsetValue;
v.style.color = unsetValue;
v.style.textAlignment = unsetValue;
return true;
});
}