Skip to content

Commit

Permalink
Updates per feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
edonehoo committed Apr 30, 2024
1 parent 1c6caac commit a1bed07
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import ShareSquareIcon from '@patternfly/react-icons/dist/esm/icons/share-square

A single select toggle group allows users to toggle between multiple items.

To support single selection, use the `onChange` callback to pass the selected `<ToggleGroupItem>` to `isSelected`.
To indicate whether a `<ToggleGroupItem>` is selected or not, use the `isSelected` property.

```ts file="./ToggleGroupDefaultSingle.tsx"
```
Expand All @@ -28,8 +28,6 @@ A multi select toggle group allows users to select multiple items at once.

When a toggle item is disabled it cannot be selected. Click the "Disable all" button in the following example to see this in action.

To support multiple selection, use the `onChange` callback to pass each selected `<ToggleGroupItem>` to `isSelected`.

```ts file="./ToggleGroupDefaultMultiple.tsx"
```

Expand All @@ -48,8 +46,6 @@ Adding text to a toggle item with an icon helps clarify the button's function.

To do this, pass a descriptive label to the `text` property of a `<ToggleGroupItem>`.

When passing both `text` and `icon` properties to a `<ToggleGroupItem>`, you can also pass in `iconPosition` to determine whether the icon is rendered at the start or end of the item.

```ts file="./ToggleGroupTextIcon.tsx"
```

Expand Down

0 comments on commit a1bed07

Please sign in to comment.