Skip to content

Consider moving away from the "title" attributes due to conflict with tooltips #530

@xuhdev

Description

@xuhdev

MDN doc says:

The HTMLElement.title property represents the title of the element: the text usually displayed in a 'tooltip' popup when the mouse is over the node.

However, react-share uses title for totally unrelated purposes IIUC. This makes it somewhat hard to put a tooltip with a different text on a share button in some cases.

My Particular Example

If using with MUI Tooltip, I would get the following warning:

MUI: You have provided a title prop to the child of <Tooltip />.
Remove this title prop Share this page or the Tooltip component.

Code:

              <Tooltip title="content of tooltip">
                <TwitterShareButton url="https://example.com" title="Share this page">
                  <TwitterIcon round />
                </TwitterShareButton>
              </Tooltip>

I see this warning legitimate due to the cited MDN doc above.

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

    Issue actions