Skip to content

Commit

Permalink
Update README.md File
Browse files Browse the repository at this point in the history
  • Loading branch information
GhassenEljday authored Mar 17, 2023
1 parent c1f595a commit c8283e9
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,92 @@
# react-mobile-app-button

A react component that allows you to place an iOS App Store, Google Play Store and Huawei AppGallery Download button!

## Install

install using `npm`

```bash
npm i react-mobile-app-button
```
or:

```bash
yarn add react-mobile-app-button
```

You will get an App Store, Google Play and AppGallery dwonload button on Web page looks like this:

![image](https://user-images.githubusercontent.com/58111243/226064773-ee6d7ce3-e3cf-4a37-95d6-5e6db6c916c3.png)
![image](https://user-images.githubusercontent.com/58111243/226064822-65a6cf71-32fe-4298-b4ca-6f624f82dddf.png)


## Usage

Example Code:

```js
import { GooglePlayButton } from "react-mobile-app-button";

export const MyComponent = () => {
const APKUrl =
"https://play.google.com/store/apps/details?id=host.exp.exponent";

return (
<div>
<GooglePlayButton
url={APKUrl}
theme={"light"}
className={"custom-style"}
/>
</div>
);
};
```

You can also import more than one burron in a row:

```js
import {
GooglePlayButton,
AppGalleryButton,
ButtonsContainer,
} from "react-mobile-app-button";

export const MyComponent = () => {
const APKUrl =
"https://play.google.com/store/apps/details?id=host.exp.exponent";
const iOSUrl = "https://apps.apple.com/us/app/expo-go/id982107779";

return (
<ButtonsContainer>
<GooglePlayButton
url={APKUrl}
theme={"light"}
className={"custom-style"}
/>

<AppGalleryButton
url={iOSUrl}
theme={"light"}
className={"custom-style"}
/>
</ButtonsContainer>
);
};
```
## props

| Name | Component | Type | Description
| ------------- | ------------- | ------------- | ------------- |
| url | `GooglePlayButton`, `AppGalleryButton`, `AppStoreButton` | string | Store URL |
| theme | `GooglePlayButton`, `AppGalleryButton`, `AppStoreButton` | "dark" / "light" | Button Theme |
| className | `GooglePlayButton`, `AppGalleryButton`, `AppStoreButton` | string | For manually styling |
| height | `GooglePlayButton`, `AppGalleryButton`, `AppStoreButton` | number | For manually styling |
| width | `GooglePlayButton`, `AppGalleryButton`, `AppStoreButton` | number | For manually styling |
| gap | `ButtonsContainer` | number | Control the space between buttons |
| direction | `ButtonsContainer` | "row" / "column" | Control flex direction |




0 comments on commit c8283e9

Please sign in to comment.