From c465fd731e3d6ed2a326e6dcd40f3beb1b6712d1 Mon Sep 17 00:00:00 2001 From: gunnigylfa Date: Wed, 13 Dec 2017 16:12:45 +0000 Subject: [PATCH] modifying fontSize style in order to be able to animated fontSize --- lib/js/src/style.js | 4 ++-- src/style.re | 2 +- src/style.rei | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/js/src/style.js b/lib/js/src/style.js index 4d795ce9e..1d615d5c6 100644 --- a/lib/js/src/style.js +++ b/lib/js/src/style.js @@ -752,10 +752,10 @@ function fontFamily(param) { ]; } -function fontSize(param) { +function fontSize(value) { return /* tuple */[ "fontSize", - param + value[0] ]; } diff --git a/src/style.re b/src/style.re index b5fab6ec9..535301d73 100644 --- a/src/style.re +++ b/src/style.re @@ -532,7 +532,7 @@ let color = stringStyle("color"); let fontFamily = stringStyle("fontFamily"); -let fontSize = floatStyle("fontSize"); +let fontSize = (value) => ("fontSize", encode_float_interpolated_animated(value)); type fontStyle = | Normal diff --git a/src/style.rei b/src/style.rei index b73bb8a18..5490057fa 100644 --- a/src/style.rei +++ b/src/style.rei @@ -304,7 +304,7 @@ let color: string => styleElement; let fontFamily: string => styleElement; -let fontSize: float => styleElement; +let fontSize: float_interpolated_animated => styleElement; type fontStyle = | Normal