Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Paper__PaperProvider.re
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[@bs.module "react-native-paper"] [@react.component]
external make: (~children: React.element) => React.element = "Provider";
external make:
(~children: React.element, ~theme: Paper__ThemeProvider.Theme.t=?) =>
React.element =
"Provider";
10 changes: 10 additions & 0 deletions src/Paper__ThemeProvider.re
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,29 @@ module Theme = {
(~regular: font, ~medium: font, ~light: font, ~thin: font) => t;
};

module Animation = {
type t;

[@bs.obj] external make: (~scale: float) => t;

[@bs.get] external scale: t => float = "scale";
};

[@bs.obj]
external make:
(
~roundness: int=?,
~dark: bool=?,
~colors: Colors.t=?,
~fonts: Fonts.configured=?,
~animation: Animation.t=?,
unit
) =>
t;

[@bs.get] external fonts: t => Fonts.configured = "fonts";
[@bs.get] external colors: t => Colors.t = "colors";
[@bs.get] external animation: t => Animation.t = "animation";
[@bs.get] external dark: t => bool = "dark";
};

Expand Down