Log1x / acf-composer

Compose ACF Fields, Blocks, Widgets, and Option Pages with ACF Builder on Sage 10.
https://github.com/Log1x/acf-composer
MIT License
413 stars 56 forks source link

Custom Block Icon #265

Closed Tartamata closed 3 weeks ago

Tartamata commented 1 month ago

Hi,

I'm hoping to get some guidance on incorporating custom SVG icons into ACF Composer blocks within Sage 10.

Currently, I'm using the following approach:

public $icon = '<svg></svg>'; This method works, but it becomes cumbersome to maintain, especially when the same icon appears across multiple blocks or if the SVG code is lengthy.

Ideally, I'd like to leverage the asset directive to link these icons. Is there a supported way to achieve this within ACF Composer?

Thanks in advance for your assistance!

Log1x commented 1 month ago

Hey! I'll be sure to add support for this in ACF Composer v4. No ETA yet, though.

Log1x commented 3 weeks ago

Support for this is added. Check https://github.com/Log1x/acf-composer/pull/277 for an example.