Skip to content

Add formatted tooltip text #40

Open
@jaycincotta

Description

@jaycincotta

Specifying typeOfWidget is insufficient. For example, I'm using this with election software and would like tooltips such as:

John Smith received an average rating of 4.5 stars among 1000 voters

In addition, the current implementation of titleText makes an assumption that typeOfWidget is a noun that can be pluralized by adding an 's'. This won't work in all cases. For example, the plural of "Cherry" is "Cherries"

The tooltip needs to be calculated dynamically. I suggest adding a new property that accepts a function:

tooltipFormater: is passed the current star rating and returns a string.

Activity

fabinca

fabinca commented on Aug 23, 2023

@fabinca

I'll work on this

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jaycincotta@fabinca

        Issue actions

          Add formatted tooltip text · Issue #40 · ekeric13/react-star-ratings