Skip to content

Commit

Permalink
Add JS Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishit30G committed Jan 1, 2025
1 parent 53f3721 commit 4561b70
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/block-editor/src/components/typewriter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,25 @@ export function useTypewriter() {
);
}

/**
* Typewriter component displays its children with a typewriter effect.
*
* @example
* ```jsx
* function Example(){
* return (
* <Typewriter>
* Hello World
* </Typewriter>
* );
* }
* ```
*
* @param {Object} props
* @param {JSX.Element | string} props.children The children to display with a typewriter effect.
*
* @return {JSX.Element} The rendered Typewriter component.
*/
function Typewriter( { children } ) {
return (
<div ref={ useTypewriter() } className="block-editor__typewriter">
Expand Down

0 comments on commit 4561b70

Please sign in to comment.