diff --git a/packages/compose/README.md b/packages/compose/README.md index 0166bc51d65aa..258b0c9311e73 100644 --- a/packages/compose/README.md +++ b/packages/compose/README.md @@ -168,7 +168,7 @@ _Parameters_ - _ref_ `import('react').RefObject>`: 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_ diff --git a/packages/compose/src/hooks/use-copy-on-click/index.js b/packages/compose/src/hooks/use-copy-on-click/index.js index 99c595be99a20..238e2bc35573d 100644 --- a/packages/compose/src/hooks/use-copy-on-click/index.js +++ b/packages/compose/src/hooks/use-copy-on-click/index.js @@ -17,7 +17,7 @@ import deprecated from '@wordpress/deprecated'; * * @param {import('react').RefObject>} 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