Skip to content

Instantly share code, notes, and snippets.

@ShikaSD
Created July 26, 2020 20:57
Show Gist options
  • Save ShikaSD/136f29c2a5608ded7097f996b12993e5 to your computer and use it in GitHub Desktop.
Save ShikaSD/136f29c2a5608ded7097f996b12993e5 to your computer and use it in GitHub Desktop.
@Composable
fun input(
value: String,
type: String,
onChange: (String) -> Unit,
onKeyUp: (String) -> Unit
) {
tag(
tagName = 'input',
attributes = mapOf('value' to value, 'type' to type),
events = listOf(Change.Callback { onChange(it.value) }, KeyUp.Callback { onKeyUp(it.value) }
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment