Created
January 24, 2019 10:00
-
-
Save ivarconr/2eed93adf92eff4a2e5270384e6847da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var unleashContext = {}; | |
var fallbackVariant = { | |
enabled: false, | |
name: "disabled", | |
} | |
const varinat = getVariant('toggleName', unleashContext, fallbackVariant); | |
switch(variant.name) { | |
case "variant1" | |
varinat.payload.height | |
varinat.payload.color | |
case "variant2" | |
varinat.payload.height | |
varinat.payload.color | |
default: | |
//old stuff: | |
} | |
const varinat = getVariant('toggleName', unleashContext, fallbackVariant); | |
img.color = variant.payload.color; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment