I feel that there the src/helpers/Link should be converted into a component and that there is too many ways to have an edition of a link or a button in the editor.
We have wordpress/theme/lib/editor/components/ButtonEdit, wordpress/theme/lib/editor/components/UrlPicker & the src/components/atoms/Button/edit.tsx files.
I don't understand exactly too goal of each one.
Here would be my proposition:
Create a component Link in src/components/atoms/Link
it will have the index to render the front-end (which is currently the src/helpers/Link/index.tsx file
an edit.tsx file for the edition in the editor. It should maybe regroup functions of both ButtonEdit and UrlPicker or also in relation to #3
Move the ButtonEdit into the components/atoms/Button/edit.tsx file
I feel that there the
src/helpers/Link
should be converted into a component and that there is too many ways to have an edition of a link or a button in the editor.We have
wordpress/theme/lib/editor/components/ButtonEdit
,wordpress/theme/lib/editor/components/UrlPicker
& thesrc/components/atoms/Button/edit.tsx
files.I don't understand exactly too goal of each one.
Here would be my proposition:
src/components/atoms/Link
src/helpers/Link/index.tsx
fileButtonEdit
andUrlPicker
or also in relation to #3ButtonEdit
into thecomponents/atoms/Button/edit.tsx
fileWhat are your thoughts?