ndiego / icon-block

Effortlessly add SVG icons and graphics to your website.
https://nickdiego.com/projects/icon-block/
GNU General Public License v2.0
110 stars 15 forks source link

"wp-block-outermost-icon-block" / relative deep structure with text #24

Closed Jugibur closed 1 year ago

Jugibur commented 1 year ago

Hi, I'm wondering why you have this relative deep structure just to show an svg. I like to build a simple icon list (icon + text) but it's a bit inconvenient I think. You have to add a group, add icon plus text and rearrange both for perfect fit.

So after that the structure is:

Perhaps I don't recognize why there is the outermost icon block. Because it has a flex style my first thought was it's a kind of group, so I can just drag my text in it and have an icon + text.

That's my toughts about this. Perhaps you could improve this or could help what's the best way to reach my goal: a lightweight way for an icon + text list. Thanks!

ndiego commented 1 year ago

Hi @Jugibur, I agree that the structure is deeper than would be ideal. However, it's needed to work well within the WordPress block architecture and allow for all the customization that the block supports.

To create an icon list, I would use the Row block (a variation of the Group block) and then add an Icon block and a Paragraph block. However, this is not a "simple icon list" as you are looking for. You would probably need a custom-built block for this purpose.