-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branches 'master' and 'master' of github.com:razorpay/blade
- Loading branch information
Showing
17 changed files
with
734 additions
and
405 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,47 +40,52 @@ Before you install the package, make sure that you have performed the following | |
|
||
## ⬇ Add blade to your application | ||
|
||
1. Install blade as a dependency. | ||
Blade has a peer dependency on a few libraries, you can skip adding it if you already have it installed in your project. | ||
1. Install blade as a dependency. | ||
Blade has a peer dependency on a few libraries, you can skip adding it if you already have it installed in your project. | ||
|
||
- `styled-components` | ||
```shell | ||
yarn add @razorpay/blade [email protected] @razorpay/i18nify-js @razorpay/i18nify-react | ||
``` | ||
|
||
- `styled-components` | ||
> **Note** | ||
> | ||
> Currently, blade only supports styled-components v5 only | ||
- `@razorpay/i18nify-js` | ||
- Blade uses this library for formatting capabilities in [Amount](https://blade.razorpay.com/?path=/docs/components-amount--docs) and other components based on the locale. Follow [this guide](https://www.npmjs.com/package/@razorpay/i18nify-js) to install it. | ||
- `@razorpay/i18nify-react` | ||
- A state management React wrapper for `@razorpay/i18nify-js` that maintains locale state of your page. Follow [this guide](https://www.npmjs.com/package/@razorpay/i18nify-react) to configure and install it. | ||
|
||
```shell | ||
yarn add @razorpay/blade [email protected] | ||
``` | ||
2. Follow [this guide](#-install-fonts) to install the fonts. | ||
|
||
3. For **React Native** projects you need to do additional setup for the peer dependencies: | ||
|
||
```shell | ||
yarn add @floating-ui/[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] @gorhom/[email protected] @gorhom/[email protected] | ||
``` | ||
|
||
- `react-native-reanimated` | ||
- Follow [this guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) to install it on Android & iOS which is required by Blade. | ||
- `react-native-svg` | ||
- Follow [this guide](https://github.com/react-native-svg/react-native-svg#with-react-native-cli) to install it on Android & iOS which is required by Blade. | ||
- `react-native-gesture-handler` | ||
- Follow [this guide](https://docs.swmansion.com/react-native-gesture-handler/docs/installation) to install it, note that you don't need to add `<GestureHandlerRootView style={{ flex: 1 }}>` again on the root because BladeProvider already adds that out of the box. | ||
- `@gorhom/bottom-sheet` | ||
- Add this as peer dependency, no need to do additional setup since BladeProvider already sets everything up. | ||
- `@gorhom/portal` | ||
- Add this as peer dependency, no need to do additional setup since BladeProvider already sets everything up. | ||
- `@floating-ui/react-native` | ||
- Add this as peer dependency, no need to do additional setup. | ||
- `react-native-tab-view` | ||
- Add this as peer dependency, no need to do additional setup. This is needed for react-native Tabs component as per [this guide](https://reactnavigation.org/docs/tab-view/#installation). | ||
- `react-native-pager-view` | ||
- Add this as peer dependency, no need to do additional setup. This is needed for react-native Tabs component as per [this guide](https://reactnavigation.org/docs/tab-view/#installation). | ||
|
||
And finally run `pod install` command so that blade's RN dependencies are linked to your project: | ||
|
||
```shell | ||
cd ios && pod install | ||
``` | ||
3. For **React Native** projects you need to do additional setup for the peer dependencies: | ||
|
||
```shell | ||
yarn add @floating-ui/[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] @gorhom/[email protected] @gorhom/[email protected] | ||
``` | ||
|
||
- `react-native-reanimated` | ||
- Follow [this guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) to install it on Android & iOS which is required by Blade. | ||
- `react-native-svg` | ||
- Follow [this guide](https://github.com/react-native-svg/react-native-svg#with-react-native-cli) to install it on Android & iOS which is required by Blade. | ||
- `react-native-gesture-handler` | ||
- Follow [this guide](https://docs.swmansion.com/react-native-gesture-handler/docs/installation) to install it, note that you don't need to add `<GestureHandlerRootView style={{ flex: 1 }}>` again on the root because BladeProvider already adds that out of the box. | ||
- `@gorhom/bottom-sheet` | ||
- Add this as peer dependency, no need to do additional setup since BladeProvider already sets everything up. | ||
- `@gorhom/portal` | ||
- Add this as peer dependency, no need to do additional setup since BladeProvider already sets everything up. | ||
- `@floating-ui/react-native` | ||
- Add this as peer dependency, no need to do additional setup. | ||
- `react-native-tab-view` | ||
- Add this as peer dependency, no need to do additional setup. This is needed for react-native Tabs component as per [this guide](https://reactnavigation.org/docs/tab-view/#installation). | ||
- `react-native-pager-view` | ||
- Add this as peer dependency, no need to do additional setup. This is needed for react-native Tabs component as per [this guide](https://reactnavigation.org/docs/tab-view/#installation). | ||
|
||
And finally run `pod install` command so that blade's RN dependencies are linked to your project: | ||
|
||
```shell | ||
cd ios && pod install | ||
``` | ||
|
||
## 🔜 Add blade libraries to your Figma project | ||
|
||
|
@@ -162,4 +167,4 @@ We use 2 fonts. [TASA Orbiter](https://tasatype.localremote.co/) (for our headin | |
ReactFontManager.getInstance().addCustomFont(this, "TASA Orbiter Display", R.font.tasa); | ||
// rest of the content of the method | ||
} | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.