-
Notifications
You must be signed in to change notification settings - Fork 202
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
Conversation
@@ -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. |
There was a problem hiding this comment.
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...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
There was a problem hiding this 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.
6a99ec9
to
b5f1f41
Compare
Updated examples accordingly. |
Fixes #3031
Added examples of using
className
API forContextMenu
items.