Skip to content

Commit

Permalink
doc: Corrected headings and removed justify
Browse files Browse the repository at this point in the history
  • Loading branch information
im3dabasia committed Dec 24, 2024
1 parent 5525c9f commit 726e5a9
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# TextAlignmentControl

The `TextAlignmentControl` component is responsible for rendering a control element that allows users to select and apply text alignment options to blocks or elements in the Gutenberg editor. It provides an intuitive interface for aligning text with options such as `left`, `center`, `right`, and `justify`.
The `TextAlignmentControl` component is responsible for rendering a control element that allows users to select and apply text alignment options to blocks or elements in the Gutenberg editor. It provides an intuitive interface for aligning text with options such as `left`, `center` and `right`.

## Development guidelines
## Usage

### Usage

Renders the Text Alignment Component with `left`, `center`, `right`, and `justify` alignment options.
Renders the Text Alignment Component with `left`, `center` and `right` alignment options.

```jsx
import { TextAlignmentControl } from '@wordpress/block-editor';
Expand All @@ -21,21 +19,21 @@ const MyTextAlignmentControlComponent = () => (
);
```

### Props
## Props

### `value`

- **Type:** `String`
- **Default:** `left`
- **Options:** `left`, `center`, `right`, `justify`
- **Options:** `left`, `center`, `right`

The current value of the text alignment setting. You may only choose from the `Options` listed above.

### `onChange`

- **Type:** `Function`

A callback function invoked when the text alignment value is changed via an interaction with any of the options. The function is called with the new alignment value (`left`, `center`, `right`, `justify`) as the only argument.
A callback function invoked when the text alignment value is changed via an interaction with any of the options. The function is called with the new alignment value (`left`, `center`, `right`) as the only argument.

### `className`

Expand Down

0 comments on commit 726e5a9

Please sign in to comment.