Skip to content

Conversation

@EHandtkeBasis
Copy link
Member

No description provided.

@EHandtkeBasis EHandtkeBasis linked an issue Dec 9, 2025 that may be closed by this pull request
7 tasks
@EHandtkeBasis EHandtkeBasis added the status: waiting-for-review The PR is ready. Waiting for team members to review. label Dec 9, 2025
Copy link
Member

@bbrennanbasis bbrennanbasis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but @EHandtkeBasis, wouldn't it make more sense to change it into a switch statement since it's checking four different ranges of values?

        .onValueChange(e -> {
          Integer value = e.getValue();

          if(value > 0 && value < 30) {
            slider.setTheme(Theme.PRIMARY);
          }

          if(value >= 30 && value < 50) {
            slider.setTheme(Theme.SUCCESS);
          }

          if(value >= 50 && value < 80) {
            slider.setTheme(Theme.WARNING);
          }

          if(value >= 80 && value <= 100) {
            slider.setTheme(Theme.DANGER);
          }
        });

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

Labels

status: waiting-for-review The PR is ready. Waiting for team members to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in SliderLabelsView

3 participants