Skip to content

Instantly share code, notes, and snippets.

@lintonye
Created Aug 21, 2018
Embed
What would you like to do?
import { Data, Override } from "framer";
const data = Data({ cardFocus: "number" }); // => App state
export const Flip: Override = () => {
return {
onTap() {
// toggle card focus which determines the visible side of the card
data.cardFocus = data.cardFocus === "number" ? "cvc" : "number";
}
};
};
export const ChangeFocus: Override = () => {
return {
// This goes to set the "focused" prop of the card component
focused: data.cardFocus
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment