Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated the readme file of the boilder plate for the newly created co… #31

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 22 additions & 26 deletions __app/script/boilerPlate.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,47 +98,43 @@ export default W${COMPONENT};
export { default } from './${COMPONENT}';
`;

const READMEContent = `## 1. Happy Flow
#### a) Passing child
const READMEContent = `
# {component name}

A short description about the component


## Demo

## 2. Success: successCb callBack Fn along with success msg
A minimal [Online demo](link of codesandbox).


## Usage/Examples

Here's an example of basic usage:

\`\`\`javascript

> [!Note]
> **successCb** will get an object contains the property **msgType**, **msg**, **data**
\`\`\`

## 3. Failure: failureCb callBack Fn along with failure msg
Here's an example of a complex usage:

\`\`\`javascript

\`\`\`

## User guide

### Props

> [!Note]
> **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

## 4. Failure: Device don't support the feature and you want to hide the feauture from User





> [!Note]
> if **showForever** props value is false, feature will be hidden in case of unSupported by the device

## 5. Combine with all props




| Prop name | Description | Type | Default value | Universal |
| ---------- | ------------------ | -------- | ---------------- | ------------------ |
| showForever| | Boolean | | :white_check_mark: |
| loadingCb | | function | | :white_check_mark: |
| successCb | | function | | :white_check_mark: |
| failureCb | | function | | :white_check_mark: |
| successMsg | | String | | :white_check_mark: |
| failureMsg | | Object | | :white_check_mark: |

`;

Expand Down