DRY repetitive workflows

Hi !

So here’s the deal:

  • I have 3 boxes with 2 buttons each
  • The two buttons of each boxes do exactly the same thing: show an image

My workflow works likes this:

  • When I click on a button, I want the group to flip out and the image to flip in
  • When I click on the image, I want the image to flip out and the group to flip in
  • Considering I have 6 buttons and 6 images, it makes a super repetitive workflow.

flipped photo

It works but I’m curious of how you guys would DRY this up ?

Two options came to me:

Transform this box in a reusable element.

Do this using a repeating group.

Both ways you will have to "program"the buttons and events only once.