One-time code
Sent by text message.
You can send again in 24 seconds.
Sent by text message.That code does not match. Check the message and try again.
Source
let help = React.string("Sent by text message.")
@react.component
let make = () =>
<>
<KitReact.Roles.FormGroup
id="react-code-empty"
label={React.string("Code")}
help
kind={KitReact.Roles.OneTimeCode.control({name: "code", length: 6, sendAgain: {props: {}}})}
/>
<KitReact.Roles.FormGroup
id="react-code-filled"
label={React.string("Code")}
help
kind={KitReact.Roles.OneTimeCode.control({
name: "code",
length: 6,
sendAgain: {wait: [Text("You can send again in 24 seconds.")], props: {}},
props: {defaultValue: "428193"},
})}
/>
<KitReact.Roles.FormGroup
id="react-code-refused"
label={React.string("Code")}
help
error={React.string("That code does not match. Check the message and try again.")}
kind={KitReact.Roles.OneTimeCode.control({name: "code", length: 6, sendAgain: {props: {}}, props: {defaultValue: "428139"}})}
/>
<KitReact.Roles.FormGroup
id="react-code-unavailable"
label={React.string("Code")}
help={React.string("Codes are not accepted while the studio is closed.")}
kind={KitReact.Roles.OneTimeCode.control({name: "code", length: 6, disabled: true, sendAgain: {props: {}}})}
/>
</>