vue-js-toggle-button icon indicating copy to clipboard operation
vue-js-toggle-button copied to clipboard

Images /Icons as labels

Open petr-hybler opened this issue 4 years ago • 1 comments
trafficstars

hey, could please add this possibility to add icons instead of plain strings pls?

thank you

petr-hybler avatar Sep 14 '21 13:09 petr-hybler

Although it's not documented, looking through the code it appears you can use slots for the labels by setting the labels prop to true.

<toggle-button
  :labels="true"
>
  <template v-slot:checked>
    <my-checked-icon />
  </template>
  <template v-slot:unchecked>
    <my-unchecked-icon />
  </template>
</toggle-button>

bradr5 avatar Nov 23 '21 18:11 bradr5