diff --git a/__app/component/CopyToClipboard/README.md b/__app/component/CopyToClipboard/README.md index 819f0d1..6dc8a10 100644 --- a/__app/component/CopyToClipboard/README.md +++ b/__app/component/CopyToClipboard/README.md @@ -33,7 +33,7 @@
`} > - Click Me to Copy + Pass Copy Icon here ``` @@ -49,9 +49,9 @@ const successCb = ({ msgType, msg, data }) => { ```js ``` > [!Note] @@ -71,12 +71,12 @@ const failureCb = ({ msgType, msg }) => { ``` ```js ``` > [!Note] @@ -88,13 +88,13 @@ Failure can happend due to multiple reasons, due to that reason ```failureMsg``` ## 4. Failure: Device don't support the feature and you want to hide the feauture from User ```js ``` > [!Note] @@ -103,7 +103,6 @@ Failure can happend due to multiple reasons, due to that reason ```failureMsg``` ## 5. Combine with all props ```js - Pass Copy Icon to Copy Element/String + Pass Copy Icon here ``` \ No newline at end of file diff --git a/__app/component/PhoneBook/README.md b/__app/component/PhoneBook/README.md index 26cb6ac..f4fc4ee 100644 --- a/__app/component/PhoneBook/README.md +++ b/__app/component/PhoneBook/README.md @@ -1,5 +1,133 @@ ## 1. Happy Flow +#### a) Including PhoneBook Component ```js ``` + +#### b) Passing contactProperty pros to the PhoneBook Component +```js + +``` +> [!Note] +> Prop contactProperty will be an array and it can contains 5 value. These 5 value are optional, you can pass either the single/two/three/four/five values. + +#### c) Passing isSelectMultiple pros to the PhoneBook Component +```js + +``` +> [!Note] +> You can select multiple phone numbers from phonebook directory. + + +#### d) Passing child + +```js + + Pass PhoneBook Icon here + +``` + +## 2. Success: successCb callBack Fn along with success msg + +```js +const successCb = ({ msgType, msg, data }) => { + console.log(msgType); // Success + console.log(msg); // Copied Successfully + console.log(data); // data will be an array of object +} +``` +> [!Tip] +>
+> date +> +> ### +> [ +> { +> 'name': 'fe-pilot', +> 'email': 'opensrc0', +> 'tel': "7204535372", +> 'address': "Dubai" +> } +> ] + +```js + +``` +> [!Note] +> Define **successCb** fn and your will get an object in param contains the property ```msgType```, ```msg```, ```data``` + +## 3. Failure: failureCb callBack Fn along with failure msg +```js +const failureCb = ({ msgType, msg }) => { + console.log(msgType); // UN_SUPPORTED_FEATURE + console.log(msg); // PhoneBook is not supporting in your device + + OR + + console.log(msgType); // CANCELLED + console.log(msg); // Feature Cancelled + + OR + + console.log(msgType); // ERROR + console.log(msg); // Unable to fetch details from PhoneBook +} +``` +```js + +``` +> [!Note] +> Define **failureCb** fn and you will get an object in param 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 + +## 4. Failure: Device don't support the feature and you want to hide the feauture from User +```js + +``` +> [!Note] +> ```showForever``` props will false, feature will be hidden in case of unSupported by the device + + +## 5. Combine with all props +```js + + Pass PhoneBook Icon here + +``` \ No newline at end of file