UNPKG

1.43 kBMarkdownView Raw
1[![NPM](https://nodei.co/npm/react-native-jalali-calendar.png)](https://nodei.co/npm/react-native-jalali-calendar/)
2
3[![install size](https://packagephobia.now.sh/badge?p=react-native-jalali-calendar)](https://packagephobia.now.sh/result?p=react-native-jalali-calendar) [![dependencies](https://david-dm.org/hosseinmd/react-native-jalali-calendar.svg)](https://david-dm.org/hosseinmd/react-native-jalali-calendar.svg)
4
5# react-native-jalali-calendar
6
7Easy state management for react & react-native using hooks.
8it's useful for global state management and complex components state
9
10## TOC
11
12- [Install](#Install)
13
14## Install
15
16You should be install react-native-reanimated react-native-vector-icons starkstring moment-jalaali too
17
18```npm
19yarn add react-native-jalali-calendar react-native-reanimated react-native-vector-icons starkstring moment-jalaali
20```
21
22Add code to root of project
23
24```js
25// Generate required css
26import MaterialCommunityIcons from "react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf";
27const iconFontStyles = `@font-face {
28 src: url(${MaterialCommunityIcons});
29 font-family: MaterialCommunityIcons;
30}`;
31
32// Create stylesheet
33const style = document.createElement("style");
34style.type = "text/css";
35if (style.styleSheet) {
36 style.styleSheet.cssText = iconFontStyles;
37} else {
38 style.appendChild(document.createTextNode(iconFontStyles));
39}
40
41// Inject stylesheet
42document.head.appendChild(style);
43```