Styling
Last updated
Last updated
// You need to pass a `config` object instead of your `API_KEY_ID` to cotter:
// 1) Make a Config for adding Styles
var config = {
ApiKeyID: "<your-API-KEY-ID>",
Styles: {
input_label: {
fontFamily: "Roboto",
fontSize: 15,
color: "red",
fontWeight: 700,
},
input_text_container_default: {
backgroundColor: "#fce883",
padding: "20px 60px",
},
input_text: {
backgroundColor: "#fce883",
fontFamily: "Roboto",
fontSize: 20,
},
button_container: {
borderRadius: 0,
},
button_text: {
color: "aqua",
},
},
// your other config...
}
// 2) Then pass the config to Cotter
var cotter = new Cotter(config); // π Put the config in here
cotter
.signInWithOTP()
.showEmailForm()
.then(payload => {})
.catch(err => {});