Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Ability to define a custom stylename for a dialog action #616

Closed
glebfox opened this issue Aug 6, 2021 · 0 comments
Closed

Ability to define a custom stylename for a dialog action #616

glebfox opened this issue Aug 6, 2021 · 0 comments
Assignees
Milestone

Comments

@glebfox
Copy link
Contributor

glebfox commented Aug 6, 2021

See support forum.


changes

DialogAction class has withStyleName() method and can be configured in the fluent style:

new DialogAction("ok")
        .withStyleName("ok-style")
        .withCaption("OK")
        .withHandler(event -> {
              // do smth
        });

QA

  1. Create option dialog with custom DialogAction. Add style name to this action:
dialogs.createOptionDialog()
        .withActions(new DialogAction("ok")
                .withStyleName("ok-style")
                .withCaption("OK")
                .withHandler(event -> {
                    // do smth
                }));
  1. Extend theme and add the style that is used in the above code:
.ok-style {
  background: greenyellow;
}
  1. Launch the app and open dialog.
  2. Button should be colored.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants