This file contains 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
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