Skip to content

Commit

Permalink
readme.md changes for phonebook and CopyToClipBoard
Browse files Browse the repository at this point in the history
  • Loading branch information
opensrc0 committed Mar 26, 2024
1 parent a516873 commit 7bd37b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions __app/component/CopyToClipboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,15 @@ const successCb = ({ msgType, msg, data }) => {
console.log(msg); // Copied Successfully
console.log(data); // Fe-pilot library offers component like scanner, voice search, autofill otp, phonebook, share
}
```

```js
<CopyToClipboard
successCb={successCb}
successMsg="Copied Successfully"
elementToBeCopy={`Fe-pilot library offers component like scanner, voice search, autofill otp, phonebook, share`}
/>
```
> [!Note]
> Define **successCb** fn and your will get an object in param contains the property ```msgType```, ```msg```, ```data```
> **successCb** will get an object contains the property ```msgType```, ```msg```, ```data```
## 3. Failure: failureCb callBack Fn along with failure msg
```js
Expand All @@ -80,7 +78,7 @@ const failureCb = ({ msgType, msg }) => {
/>
```
> [!Note]
> Define **failureCb** fn and your will get an object in param contains the property ```msgType```, ```msg```
> **failureCb** will get an object contains the property ```msgType```, ```msg```
> [!Important]
Failure can happend due to multiple reasons, due to that reason ```failureMsg``` is an object having different kind of error property according to the error can occur in component
Expand All @@ -98,7 +96,7 @@ Failure can happend due to multiple reasons, due to that reason ```failureMsg```
/>
```
> [!Note]
> ```showForever``` props will false, feature will be hidden in case of unSupported by the device
> if ```showForever``` props value is false, feature will be hidden in case of unSupported by the device
## 5. Combine with all props
```js
Expand Down
4 changes: 2 additions & 2 deletions __app/component/PhoneBook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const successCb = ({ msgType, msg, data }) => {
console.log(msg); // Copied Successfully
console.log(data); // data will be an array of object
}

<PhoneBook
successCb={successCb}
successMsg="Details selected Successfully"
Expand Down Expand Up @@ -111,8 +112,7 @@ Failure can happend due to multiple reasons, due to that reason ```failureMsg```
/>
```
> [!Note]
> ```showForever``` props will false, feature will be hidden in case of unSupported by the device
> if ```showForever``` props value is false, feature will be hidden in case of unSupported by the device
## 5. Combine with all props
```js
Expand Down

0 comments on commit 7bd37b6

Please sign in to comment.