Skip to content

Commit

Permalink
Mark timeout as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed May 26, 2021
1 parent 662ec3d commit 74f22f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ _Parameters_

- _ref_ `import('react').RefObject<string | Element | NodeListOf<Element>>`: Reference with the element.
- _text_ `string|Function`: The text to copy.
- _timeout_ `number`: Optional timeout to reset the returned state. 4 seconds by default.
- _timeout_ `[number]`: Optional timeout to reset the returned state. 4 seconds by default.

_Returns_

Expand Down
2 changes: 1 addition & 1 deletion packages/compose/src/hooks/use-copy-on-click/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import deprecated from '@wordpress/deprecated';
*
* @param {import('react').RefObject<string | Element | NodeListOf<Element>>} ref Reference with the element.
* @param {string|Function} text The text to copy.
* @param {number} timeout Optional timeout to reset the returned
* @param {number} [timeout] Optional timeout to reset the returned
* state. 4 seconds by default.
*
* @return {boolean} Whether or not the text has been copied. Resets after the
Expand Down

0 comments on commit 74f22f7

Please sign in to comment.