Files
NativeScript/apps/ui/app/fonts-tests/text-view-page.ts
Nathan Walker 1e6fccf272 chore: cleanup
2020-07-23 14:03:37 -07:00

16 lines
451 B
TypeScript

import { StackLayout, View, unsetValue, eachDescendant } from '@nativescript/core';
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;
});
}