vue-gallery icon indicating copy to clipboard operation
vue-gallery copied to clipboard

Controls markup customizing by slots

Open pwnz22 opened this issue 4 years ago β€’ 2 comments

Hello, @RobinCK

Can i somehow customize the prev & next buttons markup? I need to add something like <a class="prev"> <span></span></a> and also change close button markup.

pwnz22 avatar May 31 '20 21:05 pwnz22

Found slots that are not in the docs. Also default classes not changing fiddle

pwnz22 avatar May 31 '20 22:05 pwnz22

Hey @pwnz22, Indeed, the prev & next buttons can be customized via slots, and the close button as well:

    <vue-gallery @close="index = null" :id="id" :images="images" :index="index" :options="getOptions()">
      <slot ref="gallery"></slot>
      <span slot="prev">&lt;</span>
      <span slot="next">&gt;</span>
    </vue-gallery>

I added a paragraph covering slots in this fork: https://github.com/bab0uk/vue-gallery/commit/34df3215385e2533a246bdf605977373b23e4819

calaoa avatar Jun 30 '20 08:06 calaoa