Skip to content

Commit

Permalink
Block Editor: JSDoc warnings fix (#22976)
Browse files Browse the repository at this point in the history
* Fix for JSDoc warnings

* Fix for JSDoc warnings

* Apply suggestions from code review

Thanks!

Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>

* Update packages/block-editor/src/components/block-toolbar/utils.js

Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>

Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
  • Loading branch information
mkaz and ocean90 authored Jun 6, 2020
1 parent dac6b18 commit c409b71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { BlockNavigationContext } from './context';
* recursive component (it renders itself), so this ensures TreeGrid is only
* present at the very top of the navigation grid.
*
* @param {Object} props
* @param {Object} props Components props.
* @param {Object} props.__experimentalFeatures Object used in context provider.
*/
export default function BlockNavigationTree( {
__experimentalFeatures,
Expand Down
13 changes: 12 additions & 1 deletion packages/block-editor/src/components/block-toolbar/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ const {
const DEBOUNCE_TIMEOUT = 250;

/**
* Hook that creates a showMover state, as well as debounced show/hide callbacks
* Hook that creates a showMover state, as well as debounced show/hide callbacks.
*
* @param {Object} props Component props.
* @param {Object} props.ref Element reference.
* @param {boolean} props.isFocused Whether the component has current focus.
* @param {number} [props.debounceTimeout=250] Debounce timeout in milliseconds.
* @param {Function} [props.onChange=noop] Callback function.
*/
export function useDebouncedShowMovers( {
ref,
Expand Down Expand Up @@ -89,6 +95,11 @@ export function useDebouncedShowMovers( {
/**
* Hook that provides a showMovers state and gesture events for DOM elements
* that interact with the showMovers state.
*
* @param {Object} props Component props.
* @param {Object} props.ref Element reference.
* @param {number} [props.debounceTimeout=250] Debounce timeout in milliseconds.
* @param {Function} [props.onChange=noop] Callback function.
*/
export function useShowMoversGestures( {
ref,
Expand Down

0 comments on commit c409b71

Please sign in to comment.