Skip to content

Commit

Permalink
adding additional bindings for RN PixelRatio
Browse files Browse the repository at this point in the history
  • Loading branch information
tinkrtailor committed Sep 24, 2017
1 parent 1435034 commit 0a38b71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/pixelRatioRe.re
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
external get : unit => int = "get" [@@bs.scope "PixelRatio"] [@@bs.module "react-native"];
external get : unit => float = "get" [@@bs.scope "PixelRatio"] [@@bs.module "react-native"];

external getFontScale : unit => float = "getFontScale" [@@bs.scope "PixelRatio"] [@@bs.module "react-native"];

external getPixelSizeForLayoutSize : int => int = "getPixelSizeForLayoutSize" [@@bs.scope "PixelRatio"] [@@bs.module "react-native"];

external roundToNearestPixel : float => float = "roundToNearestPixel" [@@bs.scope "PixelRatio"] [@@bs.module "react-native"];
8 changes: 7 additions & 1 deletion src/pixelRatioRe.rei
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
let get: unit => int;
let get: unit => float;

let getFontScale: unit => float;

let getPixelSizeForLayoutSize: int => int;

let roundToNearestPixel: float => float;

0 comments on commit 0a38b71

Please sign in to comment.