Skip to content

Make Badge implement HasTooltip #10

@ngonzalezpazFC

Description

@ngonzalezpazFC

It would be useful if each Badge could display a tooltip when hovering over it.

badge

As a workaround I made it work with this code:

                    Span span = new Span(i);
                    Tooltip.forComponent(span).withText(getTranslation(
                            "snaplets.usermanager.viewsview.hardcodedroles.tooltip"))
                            .withPosition(Tooltip.TooltipPosition.TOP_START);

                    Badge b = new Badge(span);
                    b.addThemeName(BadgeVariant.CONTRAST.getVariantName());
                    b.getStyle().setCursor("pointer");

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Under consideration

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions