contentful / field-editors

React components and extensions for building Contentful entry editor
https://contentful-field-editors.netlify.app/
MIT License
150 stars 114 forks source link

refactor: hyperlink extract common logic [TOL-1637] #1568

Closed YvesRijckaert closed 6 months ago

YvesRijckaert commented 6 months ago

Wondering if we can also have a base component? So we only need to provide the handleEditLink, handleRemoveLink and the toooltipContent and the children to it? 🤔

I tried something like that, but we are calling different hooks in all those components, the types are also different and there are other quirks (different data attributes, different forma components (link vs text), etc) It wasn't very readable in the end so I left it the way it is now