Skip to content

[bug]: Tooltip must be used within TooltipProvider #1887

Open
@Xaz16

Description

@Xaz16

What version of design-system are you using?

2.0.0-rc.16

What's Wrong?

Hello!
When I try to use Tooltip component like this:

<Tooltip label="Delete all items">
  <Button
    disabled={releasesAvailableToChoose.length === 0}
    fullWidth={true}
    variant="secondary"
    startIcon={<Rocket></Rocket>}
  >
    Add to release
  </Button>
</Tooltip>

I have an error
Tooltip must be used within TooltipProvider. I checked https://www.radix-ui.com/primitives/docs/components/tooltip which you are using internally and it is required to have Tooltip.Provider, but if we check yours implementation: there are no tooltip provider at all
https://github.com/strapi/design-system/blob/main/packages/design-system/src/components/Tooltip/Tooltip.tsx#L52

It will be really nice to have an ability to use tooltip from yours design system. Thank you in advance!

To Reproduce

Just try to use tooltip component

Expected Behaviour

To have an ability use tooltip without error

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugstatus: pending reproductionWaiting for free time to reproduce the issue, or more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions