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

Support icon classes #2237

Open
vanillajonathan opened this issue Jan 3, 2024 · 3 comments
Open

Support icon classes #2237

vanillajonathan opened this issue Jan 3, 2024 · 3 comments

Comments

@vanillajonathan
Copy link

Is your feature request related to a problem? Please describe.

The add, remove, move-up and move-down buttons are rather ugly with just a textual + and - sign.

Describe the solution you'd like

I would like to be able configure the Vanilla renderer to use icon classes so I can use the icons from Bootstap Icons or Font Awesome.

Describe alternatives you've considered

Fork the Vanilla renderer.

Framework

Vue 3

RendererSet

Vanilla

Additional context

No response

@sdirix
Copy link
Member

sdirix commented Jan 4, 2024

Thanks for the suggestion. Definitely makes sense. We should use an iconClass if it's customized. When there is none, we should fallback to the textual approach.

@davewwww
Copy link
Contributor

davewwww commented Feb 9, 2024

Hi,

it seems this affects the ArrayListRenderer and ArrayListElement. The buttons already have a class in both components, so you can already access them. You just can't access the text content yet.

      <button
        :disabled="!deleteEnabled"
        :class="styles.arrayList.itemDelete"
        type="button"
        @click="deleteClicked"
      >
        🗙
      </button>

What do you think about controlling the text via translations, like in the OneOfRenderer. So it can be changed and cleared from outside.

        <button
          ref="confirm"
          :onclick="onConfirm"
          :class="styles.dialog.buttonPrimary"
        >
          {{ control.translations.clearDialogAccept }}
        </button>

@vanillajonathan
Copy link
Author

Control the dialog via translations would be nice, but there should be a way to insert a DOM element too, not just a text string.

I need:

<button
  :disabled="!deleteEnabled"
  :class="styles.arrayList.itemDelete"
  type="button"
  @click="deleteClicked"
>
  <i class="bi bi-x-lg"></i> <!-- this one -->
</button>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants