Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@reach/tooltip: Export positionTooltip function #662

Merged
merged 1 commit into from
Dec 24, 2020

Conversation

twavv
Copy link
Contributor

@twavv twavv commented Aug 31, 2020

This allows users to re-use this logic in their own apps.

In particular, I had a use case where I wanted to change the tooltip offset and the only way I could do so was to copy the definition of the positionDefault function.

Note: I didn't test this (this PR was made from the web interface), just curious if this is something that would be acceptable. Alternatively (and/or additionally), we could add an offset prop to the Tooltip component.

Thank you for contributing to Reach UI! Please fill in this template before submitting your PR to help us process your request more quickly.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code (Compile and run).
  • Add or edit tests to reflect the change (Run with yarn test).
  • Add or edit Storybook examples to reflect the change (Run with yarn start).
  • Ensure formatting is consistent with the project's Prettier configuration.
  • Add documentation to support any new features.

This pull request:

  • Creates a new package
  • Fixes a bug in an existing package
  • Adds additional features/functionality to an existing package
  • Updates documentation or example code
  • Other

This allows users to re-use this logic in their own apps.

In particular, I had a use case where I wanted to change the tooltip offset and the only way I could do so was to copy the definition of the `positionDefault` function.

**Note:** I didn't test this (this PR was made from the web interface), just curious if this is something that would be acceptable. Alternatively (and/or additionally), we could add an `offset` prop to the `Tooltip` component.
@twavv twavv changed the title Export positionTooltip function @reach/tooltip: Export positionTooltip function Aug 31, 2020
@twavv
Copy link
Contributor Author

twavv commented Aug 31, 2020

Update: Would also be nice to export PRect type.

@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.

Latest deployment of this branch, based on commit f6d2b9c:

Sandbox Source
reach/reach-ui: reach-ui Configuration

@stale stale bot closed this Oct 15, 2020
@twavv
Copy link
Contributor Author

twavv commented Oct 15, 2020

Can this be re-opened? @chaance

@chaance chaance reopened this Oct 20, 2020
@stale stale bot removed the Resolution: Stale label Oct 20, 2020
@chaance chaance added the Type: Enhancement General improvements or suggestions label Dec 24, 2020
@chaance
Copy link
Member

chaance commented Dec 24, 2020

Sorry for the delay here, but this looks good to me. Thanks!

@chaance chaance merged commit 5d0464f into reach:develop Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement General improvements or suggestions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants