React Native Paper bindings for ReasonML
npm install bs-react-native-paper

React-native-paper for ReasonML.
---
[![Build Status][build-badge]][build]
[![Version][version-badge]][package]
[![MIT License][license-badge]][license]
[![PRs Welcome][prs-welcome-badge]][prs-welcome]
[![Chat][chat-badge]][chat]
Use yarn or npm
```
$ yarn add bs-react-native-paper react-native-paper
Then add bs-react-native-paper to bsconfig.json
`json`
"bs-dependencies": ["bs-react-native-paper"]
`ocamlcreateTheme
/ We provide a helper function called that defaults with DefaultTheme /
let theme =
Paper.ThemeProvider.(
createTheme(
~colors=
themeColors(
~primary="#6200EE",
~accent="#03dac4",
~background="#f6f6f6",
~surface="white",
~error="#B00020",
~text="black",
~disabled="rgba(0, 0, 0, 0.26)",
~placeholder="rgba(0, 0, 0, 0.54)",
~backdrop="rgba(0, 0, 0, 0.5)",
),
(),
)
);
let component = ReasonReact.statelessComponent("AppTheme");
let make = children => {
...component,
render: _self =>
(ReasonReact.array(children))
};
`
`ocaml
{ReasonReact.string("Click me")}
``
`ocaml_add
fabAction(~icon=Icon.Name("add"), ~onPress=() => Js.log("add"), ()),
fabAction(~icon=Icon.Name("star"), ~onPress=() => Js.log("start"), ()),
fabAction(~icon=Icon.Name("notifications"), ~onPress=() => Js.log("notifications"), ()),
|]
onStateChange
icon={
Icon.Element(
Icon.renderIcon((props: Icon.iconProps) =>
size={props.size}
/>
),
)
}
/>
```
Run the example app with Expo to see it in action.
The source code for the examples are under the /example folder.
We do not have dedicated documentation for this library, but you can check example usage of components in our example app. It is located in /example directory. Components' api in most cases is very similar or the same as in react-native-paper, but there are cases where we had to implement props differently, so if you encounter problems I would suggest to check the source code of particular binding.
Read the contribution guidelines before contributing.
[build-badge]: https://img.shields.io/circleci/project/github/callstackincubator/bs-react-native-paper/master.svg?style=flat-square
[build]: https://circleci.com/gh/callstackincubator/bs-react-native-paper
[version-badge]: https://img.shields.io/npm/v/bs-react-native-paper.svg?style=flat-square
[package]: https://www.npmjs.com/package/bs-react-native-paper
[license-badge]: https://img.shields.io/npm/l/bs-react-native-paper.svg?style=flat-square
[license]: https://opensource.org/licenses/MIT
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[prs-welcome]: http://makeapullrequest.com
[chat-badge]: https://img.shields.io/discord/426714625279524876.svg?style=flat-square&colorB=758ED3
[chat]: https://discord.gg/zwR2Cdh