Skip to content

Commit

Permalink
docs(menu-toggle): Updates split toggle example names. (#10930)
Browse files Browse the repository at this point in the history
* docs(menu-toggle): Updates split toggle example names.

* Update example descriptions.
  • Loading branch information
edonehoo authored Sep 16, 2024
1 parent c443514 commit cfb8694
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,19 @@ Variant styling can be applied to split button toggles to adjust their appearanc

### Split toggle with labeled checkbox

To add a text label to a split button toggle, pass `children` to the `<MenuToggle>` component.
You can allow users to select a toggle checkbox by clicking either the checkbox or the text label.

```ts file='MenuToggleSplitButtonCheckboxWithToggleText.tsx'
To link a split toggle label to the toggle's checkbox, pass both the label and the `<MenuToggleCheckbox>` component to `splitButtonOptions`.

```
```ts file='MenuToggleSplitButtonCheckboxWithText.tsx'

### Split toggle with checkbox and toggle text label
```

You can allow users to select a toggle checkbox by clicking either the checkbox or the text label.
### Split toggle with checkbox and toggle text

To do so, pass `children` to the `<MenuToggleCheckbox>` component. When the menu toggle text is clicked, the checkbox's `onChange` callback will be triggered.
To link a split toggle label to the toggle button itself, pass the label to the `<MenuToggle>` component, instead of `splitButtonOptions`.

```ts file='MenuToggleSplitButtonCheckboxWithText.tsx'
```ts file='MenuToggleSplitButtonCheckboxWithToggleText.tsx'

```

Expand Down

0 comments on commit cfb8694

Please sign in to comment.