Can I jump over a InnerBlocks component to target content inside with react-flickity-component?

Question

I’m trying to create a slider with react-flickity-component in Gutenberg WordPress Editor.

So my problem is that Gutenberg has InnerBlocks component and I want to target its content inside of it with Flickity.

So it looks like this:

<Flickity options={flickityOptions}>
  <InnerBlocks />
</Flickity>

where <InnerBlocks /> is a Gutenberg Component, which has inside, for example:

<img src="..."/>
<img src="..."/>
<img src="..."/>

So I need to jump over InnerBlocks to target images. Because InnerBlocks create two divs after Flickity Component.

And in html it will look like:

<div class="flickity">
  <div class="inner-block">
    <div class="block-list">
      <img src="...">
      <img src="...">
      <img src="...">
    </div>
  </div>
</div>

Is it possible? Thanks in advance.

0
Aslan 9 months 0 Answers 51 views 0

Leave an answer