Skip to content

Commit

Permalink
Docs: Update Observe Typing component readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishit30G committed Mar 5, 2025
1 parent e093fef commit 141622a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/block-editor/src/components/observe-typing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

`<ObserveTyping />` is a component used in managing the editor's internal typing flag. When used to wrap content, it observes keyboard and mouse events to set and unset the typing flag. The typing flag is used in considering whether the block border and controls should be visible. While typing, these elements are hidden for a distraction-free experience.

## Table of contents

1. [Development guidelines](#development-guidelines)
2. [Related components](#related-components)

## Development guidelines

## Usage

Wrap the component where blocks are to be rendered with `<ObserveTyping />`:
Expand All @@ -15,3 +22,16 @@ function VisualEditor() {
);
}
```

### Props

### `children`

- Type: `ReactNode`
- Required: Yes

The content to be wrapped by the component.

## Related components

Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a [BlockEditorProvider](https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/provider/README.md) in the components tree.

0 comments on commit 141622a

Please sign in to comment.