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

Seeking an official way to change context menu items style #753

Closed
Paper-Folding opened this issue Sep 10, 2021 · 0 comments
Closed

Seeking an official way to change context menu items style #753

Paper-Folding opened this issue Sep 10, 2021 · 0 comments

Comments

@Paper-Folding
Copy link

Paper-Folding commented Sep 10, 2021

I was passing style and customized icon class via icon properties like this (fw-bold and fs-4 are Bootstrap style classes):

$('.playlist').contextMenu({
    selector: 'li',
    build: function (target, e) {
         // some code unrelated to this issue
    },
    callback: function (key, options) {
          // some code unrelated to this issue
    },
    items: {
        "info": { name: "乐正绫 - 返夏", disabled: true , icon:" pi-right-arrow fw-bold fs-4"},
        "play": { name: "Play Instantly", icon: " pi-file-play-fill" },
        "play-next": { name: "Play Next", icon: " pi-plus" }
    }
})

And it actually do the trick as shown below:

image

I wonder if there is an official way to achieve this.

@Paper-Folding Paper-Folding changed the title I was passing style and customized icon via icon properties. Seeking an official way to change context menu items style Sep 10, 2021
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

No branches or pull requests

1 participant