Skip to content

Commit

Permalink
Documentation: Add AutosaveMonitor component JSDoc and populate `RE…
Browse files Browse the repository at this point in the history
…ADME` with auto-gen docs (#60882)


Co-authored-by: colorful-tones <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2024
1 parent 33aa0a7 commit 42947ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,13 @@ Example:
### AutosaveMonitor

Undocumented declaration.
AutosaveMonitor component. Monitors the changes made to the edited post and triggers autosave if necessary.

_Usage_

```jsx
<AutosaveMonitor interval={ 30000 } />
```

### BlockAlignmentToolbar

Expand Down
9 changes: 9 additions & 0 deletions packages/editor/src/components/autosave-monitor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ export class AutosaveMonitor extends Component {
}
}

/**
* AutosaveMonitor component.
* Monitors the changes made to the edited post and triggers autosave if necessary.
*
* @example
* ```jsx
* <AutosaveMonitor interval={30000} />
* ```
*/
export default compose( [
withSelect( ( select, ownProps ) => {
const { getReferenceByDistinctEdits } = select( coreStore );
Expand Down

0 comments on commit 42947ce

Please sign in to comment.