Last active
March 21, 2023 14:30
-
-
Save frhack/f4c8d16b122c27acafd7afaf3cc97718 to your computer and use it in GitHub Desktop.
custom react hook form in kotlin
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
FormControl { | |
sx { | |
minWidth = 200.px | |
//this@FormControl.size = Size.small | |
} | |
Controller { | |
name = "fook" | |
control = hf.control | |
render = { x: dynamic -> | |
Fragment.create() { | |
Select { | |
//sx { | |
// minWidth = 100.px | |
// this@FormControl.size = Size.small | |
//} | |
//defaultValue = "email" | |
name = "OOO" | |
id = "demo" | |
console.log(tipo) | |
value = tipo.unsafeCast<Nothing?>() | |
//MenuProps | |
onChange = { p, _ -> | |
console.log(p.target.value) | |
tipo = p.target.value | |
} | |
//input { | |
//OutlinedInput { label = ReactNode("name") } | |
//} | |
MenuItem { | |
key = "email" | |
value = "email" | |
+"email" | |
} | |
MenuItem { | |
value = "phone" | |
key = "phone" | |
+"phone" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment