mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
18 lines
412 B
TypeScript
18 lines
412 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;
|
|
}
|