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: add ContextMenu className usage examples #3043

Merged
merged 4 commits into from
Dec 13, 2023

Conversation

web-padawan
Copy link
Member

Fixes #3031

Added examples of using className API for ContextMenu items.

@github-actions github-actions bot added the Language unchecked English language and AsciiDoc formatting checks haven't been done label Dec 12, 2023
@@ -191,6 +191,39 @@ include::{root}/frontend/demo/component/contextmenu/react/context-menu-presentat
endif::[]
--

== Styling Menu Items

Individual menu items can be styled by [since:com.vaadin:[email protected]]#applying custom classnames# to them, and writing CSS style blocks targeting those classnames.
Copy link
Contributor

Choose a reason for hiding this comment

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

Apparently we've decided to use class names instead of classnames in docs, so let's go with that here as well.

(I seemed to recall a decision in the opposite direction, but now I can't find a discussion about it anywhere...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed.

Copy link
Contributor

@rolfsmeds rolfsmeds left a comment

Choose a reason for hiding this comment

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

How about, instead of Success, Warning, Error items, we would instead have a more realistic example, e.g. something like:

  • Share
  • Duplicate
  • Delete

where the last item has a "danger" classname applied and colored red.

@web-padawan web-padawan force-pushed the docs/context-menu-classname branch from 6a99ec9 to b5f1f41 Compare December 13, 2023 08:28
@web-padawan
Copy link
Member Author

we would instead have a more realistic example

Updated examples accordingly.

@web-padawan web-padawan merged commit c1fb219 into latest Dec 13, 2023
3 of 4 checks passed
@web-padawan web-padawan deleted the docs/context-menu-classname branch December 13, 2023 09:22
@russelljtdyer russelljtdyer removed the Language unchecked English language and AsciiDoc formatting checks haven't been done label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add menu-item styling to Context Menu docs
3 participants