Skip to content

Conversation

@ychhabra-eightfold
Copy link
Collaborator

@ychhabra-eightfold ychhabra-eightfold commented Sep 19, 2025

Summary

This PR adds support for passing additional props to the Tooltip wrapper element through a new wrapperProps prop. This enhancement provides greater flexibility when customizing the tooltip wrapper behavior and styling.

Changes

  • Added wrapperProps prop: New optional prop of type React.HTMLAttributes<HTMLDivElement> that allows passing any valid HTML div attributes to the tooltip wrapper
  • Applied wrapper props: The wrapperProps are spread onto both conditional wrapper elements in the Tooltip component
  • Updated Storybook: Added wrapperProps control to the Tooltip stories for testing and documentation
  • Type safety: Properly typed the new prop with default value of empty object

Use Cases

This change enables:

  • Adding custom data attributes to the wrapper
  • Setting accessibility attributes (aria-*, role, etc.)
  • Adding event handlers to the wrapper element
  • Any other valid HTML div attributes that might be needed for integration purposes

Backward Compatibility

✅ Fully backward compatible - the new prop is optional with a safe default value of {}

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@mfazil-eightfold mfazil-eightfold left a comment

Choose a reason for hiding this comment

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

lgtm

@ychhabra-eightfold ychhabra-eightfold merged commit 09b2e4d into EightfoldAI:main Sep 19, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants