How to create Figma components that switch with variant modes?

Use this technique to switch components based on local or external variants.
This is specially interesting when combined with an external…