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

Add support for a custom onClick for ClickToComponent #28

Open
frantic opened this issue Apr 27, 2022 · 0 comments
Open

Add support for a custom onClick for ClickToComponent #28

frantic opened this issue Apr 27, 2022 · 0 comments

Comments

@frantic
Copy link
Contributor

frantic commented Apr 27, 2022

Is your feature request related to a problem? Please describe.

  1. Support click-to-component in web environments like Replit
  2. Add custom logic to run before editor is opened

Describe the solution you'd like

Make <ClickToComponent /> accept an onClick callback that would get the element, component, file path, etc. as arguments.

Describe alternatives you've considered

Intercepting navigation events or patching window.open: both seem fragile and miss information about the target HTMLElement.

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 a pull request may close this issue.

1 participant