Skip to content

Commit

Permalink
add examples of acceptable JSDoc for react component
Browse files Browse the repository at this point in the history
  • Loading branch information
tarnas14 committed Apr 20, 2022
1 parent 8576092 commit 4c49d32
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions applications/launchpad_v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,26 @@ $ npm run bundle
1. Prefer default export
1. Put types and interface in co-located `types.ts` file

component JSDoc examples:
```js
/**
* renders tari button
*
* @prop {() => void} onClick - event handler for click event
* @prop {string} color - text color of the button text
*/
const TariButton = ({ onClick }: TariButtonProps) => { ... }
```

```js
/**
* renders tari button
*
* @prop {TariButtonProps} props - tari button props
*/
const TariButton = ({ onClick }: TariButtonProps) => { ... }
```

### Definition of done

- _must have_: a minimal test that tries to render a given component
Expand Down

0 comments on commit 4c49d32

Please sign in to comment.