Skip to content

Rete V2 : Customize context menu component (Vue.js) #73

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

Closed
JosueGauthier opened this issue Jul 10, 2023 · 2 comments
Closed

Rete V2 : Customize context menu component (Vue.js) #73

JosueGauthier opened this issue Jul 10, 2023 · 2 comments

Comments

@JosueGauthier
Copy link

Hello,
I would like to customize the shape, style, ... of my context menu component, but i found nothing except this issue : #9 but it is a V1 example.

Is there a V2 functionality for render.addPreset(Presets.contextMenu.setup(cus)); like that ?

  render.addPreset(
    Presets.classic.setup({
      customize: {
   ....
      },
    })
  );

Thanks,

@Ni55aN
Copy link
Member

Ni55aN commented Jul 10, 2023

https://retejs.org/docs/guides/renderers/vue#customize-context-menu

@JosueGauthier
Copy link
Author

JosueGauthier commented Jul 11, 2023

Thank you again, it works perfectly :)

For those who wants class selectors names, below a scss example :

@import "./vars";

[rete-context-menu] {
  width: 320px !important;
  border: none;

  .block {
    background: $selected-color;
    border: none;
  }

  .block.item {
    border: none;
    font-weight: 600;
    font-family: "PathWay", sans-serif;
  }

  .block.item:hover {
    background: white;
    color: $selected-color;
  }

  .block:first-child input {
    background: $background-color;
    border: none;
  }
  .block:first-child input:focus {
    background: white;
    border: none;
  }
  .block:first-child:hover {
    background: $selected-color;
    border: none;
  }
  .search {
    color: $selected-color;
    font-weight: 600;
    font-family: "PathWay", sans-serif;
  }
}

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

2 participants