Files
Vasil Chimev 66d631ebca Revert "Revert "feat(animation): support animating width/height properties (WIP) (#4917)" (#5136)"
This reverts commit 8973a6febde4a4b41637d80b17506a7d25ffebf8.
2019-05-07 13:58:07 +03:00

18 lines
410 B
TypeScript

import {Label} from 'tns-core-modules/ui/label';
let toggle = false;
export function animateHeight(args) {
const clicked = args.object as Label;
clicked
.animate({
height: toggle ? 128 : '100%',
duration: 200,
curve: 'easeInOut'
})
.then(() => {
clicked.text = toggle ? "Cool." : "Tap here";
});
toggle = !toggle;
}