Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(toggle-group): Adds example documentation. #10309

Merged
merged 2 commits into from
May 8, 2024

Conversation

edonehoo
Copy link
Contributor

Closes #10295

@edonehoo edonehoo self-assigned this Apr 26, 2024
@patternfly-build
Copy link
Contributor

patternfly-build commented Apr 26, 2024

@edonehoo
Copy link
Contributor Author

@thatblindgeye @tlabaj have some toggle group docs for your review! Couple things:

  • Not sure if the isSelected guidance is correct or detailed enough, so please lmk how that can be improved!

  • Regarding the iconPosition prop mention that I added to the "with text and icons" example -- I don't see that used in the example or listed in the props table? Maybe that'll pop up as a result of feat(Toggle group): Add support for icon position #10291 (review), but wanted to mention just in case something needs to be added

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this content! I (hopefully) answered your questions/comments from above with my below comments 😆


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the update that added this prop was in the v6 branch, this line should be removed for this PR, but we would want to add it to the v6 branch whenever this update gets pulled into v6 (or we could open a separate PR that adds this content to v6).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that makes sense. Do you think I can just link that additional PR to the same issue, or is a new issue needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we've done either way, but a new issue wouldn't hurt. For what it's worth Michael had split out an issue assigned to me in Core into 2 separate issues, one for V5 and one for V6.

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tlabaj tlabaj merged commit f96f7a0 into patternfly:main May 8, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ToggleGroup - add example descriptions
5 participants