You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a custom block, I have some settings defined inside InspectorControls with like toggles, selects, inputs, etc. Now I have to implement a setting that I can't get done with the provided Components, so I'd like to know how to create my own component, preferably in JSX.
Fabian Kägy had some tips:
I tend to start by wrapping my control in the BaseControl
It already gives you all the styles for labels, help text etc. And from there it really is just plain react, and you can do whatever you want.
A nice addition to this post could be how to enhance core components with custom hooks and higher order components (here's an example - see useCharLimit and withCharLimit)
Or maybe this is material for a complementary post (that I'd be happy to write about).
Discussed in #252
Originally posted by bph April 23, 2024
In the outreach channel, there was a discussion around this topic:
Jessica Lyschik elaborated:
Fabian Kägy had some tips:
The text was updated successfully, but these errors were encountered: